aboutsummaryrefslogtreecommitdiff
path: root/environment.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2022-06-10 22:20:10 +0700
committerShulhan <ms@kilabit.info>2022-06-12 13:02:21 +0700
commit8c8619d939e57c42dcb28c3f680ec9a3c6d075fa (patch)
tree97b541d7265e5c36388ab298243bef2d221644a1 /environment.go
parentd84e92947fa9d935c374430567b6a3d88a371b5e (diff)
downloadrescached-8c8619d939e57c42dcb28c3f680ec9a3c6d075fa.tar.xz
all: fixes HTTP API for updating environment
There are two issues when updating environment. One is on the front, where debug value is send as string. Another one is the back, where new environment overwrite all of options where it should only update only DNS server options and Debug fields.
Diffstat (limited to 'environment.go')
-rw-r--r--environment.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/environment.go b/environment.go
index 5ada098..7206aed 100644
--- a/environment.go
+++ b/environment.go
@@ -142,8 +142,8 @@ func (env *Environment) init() (err error) {
if len(env.WUIListen) == 0 {
env.WUIListen = defWuiAddress
}
- if len(env.ListenAddress) == 0 {
- env.ListenAddress = defListenAddress
+ if len(env.ServerOptions.ListenAddress) == 0 {
+ env.ServerOptions.ListenAddress = defListenAddress
}
if len(env.FileResolvConf) > 0 {
_, _ = env.loadResolvConf()