0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-29 01:07:55 +01:00
This commit is contained in:
Lunny Xiao 2024-09-27 12:51:27 -07:00
parent f173431b8e
commit 1a8acdefbc
No known key found for this signature in database
GPG key ID: C3B7C91B632F738A

View file

@ -16,7 +16,7 @@ var ReverseProxyAuth = struct {
ReverseProxyTrustedProxies []string ReverseProxyTrustedProxies []string
}{} }{}
func loadReverseProxyAuthFrom(rootCfg ConfigProvider) error { func loadReverseProxyAuthFrom(rootCfg ConfigProvider) {
serviceSec := rootCfg.Section("service") serviceSec := rootCfg.Section("service")
ReverseProxyAuth.Enabled = serviceSec.Key("ENABLE_REVERSE_PROXY_AUTHENTICATION").MustBool() ReverseProxyAuth.Enabled = serviceSec.Key("ENABLE_REVERSE_PROXY_AUTHENTICATION").MustBool()
@ -35,6 +35,4 @@ func loadReverseProxyAuthFrom(rootCfg ConfigProvider) error {
if len(ReverseProxyAuth.ReverseProxyTrustedProxies) == 0 { if len(ReverseProxyAuth.ReverseProxyTrustedProxies) == 0 {
ReverseProxyAuth.ReverseProxyTrustedProxies = []string{"127.0.0.0/8", "::1/128"} ReverseProxyAuth.ReverseProxyTrustedProxies = []string{"127.0.0.0/8", "::1/128"}
} }
return nil
} }