diff options
| author | Shulhan <ms@kilabit.info> | 2022-06-10 22:20:10 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2022-06-12 13:02:21 +0700 |
| commit | 8c8619d939e57c42dcb28c3f680ec9a3c6d075fa (patch) | |
| tree | 97b541d7265e5c36388ab298243bef2d221644a1 /environment.go | |
| parent | d84e92947fa9d935c374430567b6a3d88a371b5e (diff) | |
| download | rescached-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.go | 4 |
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() |
