mirror of
https://github.com/safing/portmaster
synced 2025-09-01 10:09:11 +00:00
Update handling of api listen address override
This commit is contained in:
parent
edebfbd687
commit
d01c619400
3 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
}
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
package ui
|
||||
|
||||
import (
|
||||
"github.com/safing/portbase/api"
|
||||
"github.com/safing/portbase/modules"
|
||||
)
|
||||
|
||||
func init() {
|
||||
modules.Register("ui", prep, nil, nil, "updates", "api")
|
||||
api.SetDefaultAPIListenAddress("127.0.0.1:817")
|
||||
}
|
||||
|
||||
func prep() error {
|
||||
|
|
Loading…
Add table
Reference in a new issue