Update handling of api listen address override
This commit is contained in:
@@ -35,7 +35,7 @@ func prepAPIAuth() error {
|
||||
|
||||
func startAPIAuth() {
|
||||
var err error
|
||||
apiIP, apiPort, err = parseHostPort(api.GetAPIAddress())
|
||||
apiIP, apiPort, err = parseHostPort(apiListenAddress())
|
||||
if err != nil {
|
||||
log.Warningf("firewall: failed to parse API address for improved api auth mechanism: %s", err)
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ var (
|
||||
filterDNSByScope status.SecurityLevelOption
|
||||
filterDNSByProfile status.SecurityLevelOption
|
||||
devMode config.BoolOption
|
||||
apiListenAddress config.StringOption
|
||||
)
|
||||
|
||||
func registerConfig() error {
|
||||
@@ -56,7 +57,8 @@ func registerConfig() error {
|
||||
}
|
||||
filterDNSByProfile = status.ConfigIsActiveConcurrent("firewall/filterDNSByProfile")
|
||||
|
||||
devMode = config.Concurrent.GetAsBool("firewall/permanentVerdicts", true)
|
||||
devMode = config.Concurrent.GetAsBool("firewall/permanentVerdicts", false)
|
||||
apiListenAddress = config.GetAsString("api/listenAddress", "")
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user