Disable features not availables in some platforms

This commit is contained in:
Manuel de Brito Fontes 2017-11-12 10:33:18 -03:00
parent 0d2434f87f
commit fdd231816c
4 changed files with 22 additions and 11 deletions

View file

@ -25,6 +25,7 @@ import (
"net"
"os"
"os/exec"
"runtime"
"strconv"
"strings"
"sync"
@ -598,6 +599,15 @@ func (n *NGINXController) OnUpdate(ingressCfg ingress.Configuration) error {
cfg.SSLDHParam = sslDHParam
// disable features are not available in some platforms
switch runtime.GOARCH {
case "arm", "arm64", "ppc64le":
cfg.EnableModsecurity = false
case "s390x":
cfg.EnableModsecurity = false
cfg.EnableBrotli = false
}
tc := ngx_config.TemplateConfig{
ProxySetHeaders: setHeaders,
AddHeaders: addHeaders,