add local networks to trusted proxies

This commit is contained in:
Michał Adamski
2024-12-30 19:08:11 +01:00
parent dd4f4690be
commit d564d5dc95

View File

@@ -32,7 +32,7 @@ func main() {
// if you disable TLS, then I guess you want to use existing proxy
if !tlsEnabled {
config.EnableTrustedProxyCheck = true
config.TrustedProxies = []string{"127.0.0.1"}
config.TrustedProxies = []string{"127.0.0.1", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"}
config.ProxyHeader = fiber.HeaderXForwardedFor
}