fix(ssl): default httpEnabled to false [EE-2465] (#6495)

pull/6511/head
Marcelo Rydel 2022-02-01 09:14:43 -03:00 committed by GitHub
parent 7d91ab72e1
commit cf459a2d28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -16,7 +16,7 @@ const (
defaultTLSCertPath = "/certs/cert.pem"
defaultTLSKeyPath = "/certs/key.pem"
defaultHTTPDisabled = "false"
defaultHTTPEnabled = "true"
defaultHTTPEnabled = "false"
defaultSSL = "false"
defaultSSLCertPath = "/certs/portainer.crt"
defaultSSLKeyPath = "/certs/portainer.key"

View File

@ -13,7 +13,7 @@ const (
defaultTLSCertPath = "C:\\certs\\cert.pem"
defaultTLSKeyPath = "C:\\certs\\key.pem"
defaultHTTPDisabled = "false"
defaultHTTPEnabled = "true"
defaultHTTPEnabled = "false"
defaultSSL = "false"
defaultSSLCertPath = "C:\\certs\\portainer.crt"
defaultSSLKeyPath = "C:\\certs\\portainer.key"

View File

@ -285,8 +285,8 @@ func updateSettingsFromFlags(dataStore dataservices.DataStore, flags *portainer.
if *flags.HTTPDisabled {
sslSettings.HTTPEnabled = false
} else {
sslSettings.HTTPEnabled = *flags.HTTPEnabled || sslSettings.HTTPEnabled
} else if *flags.HTTPEnabled {
sslSettings.HTTPEnabled = true
}
err = dataStore.SSLSettings().UpdateSettings(sslSettings)