enhance: escalate ProxyHeader as a global config

This commit is contained in:
HFO4
2022-12-16 16:58:06 +08:00
parent 9860ebbca9
commit 82b4e29a80
3 changed files with 10 additions and 10 deletions

View File

@@ -61,6 +61,7 @@ func main() {
}
api := routers.InitRouter()
api.TrustedPlatform = conf.SystemConfig.ProxyHeader
server := &http.Server{Handler: api}
// 收到信号后关闭服务器
@@ -102,7 +103,6 @@ func main() {
}
}
api.TrustedPlatform = conf.UnixConfig.ProxyHeader
util.Log().Info("Listening to %q", conf.UnixConfig.Listen)
if err := RunUnix(server); err != nil {
util.Log().Error("Failed to listen to %q: %s", conf.UnixConfig.Listen, err)