fix: IP address is empty in unix socket mode (#1314)

pull/1324/head
WeidiDeng 2 years ago committed by GitHub
parent 3fa1249678
commit 36b310133c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -76,6 +76,7 @@ func main() {
}
}
api.TrustedPlatform = conf.UnixConfig.ProxyHeader
util.Log().Info("开始监听 %s", conf.UnixConfig.Listen)
if err := api.RunUnix(conf.UnixConfig.Listen); err != nil {
util.Log().Error("无法监听[%s]%s", conf.UnixConfig.Listen, err)

@ -35,7 +35,8 @@ type ssl struct {
}
type unix struct {
Listen string
Listen string
ProxyHeader string `validate:"required_with=Listen"`
}
// slave 作为slave存储端配置

@ -45,7 +45,8 @@ var SSLConfig = &ssl{
}
var UnixConfig = &unix{
Listen: "",
Listen: "",
ProxyHeader: "X-Forwarded-For",
}
var OptionOverwrite = map[string]interface{}{}

Loading…
Cancel
Save