mirror of https://github.com/gofiber/fiber.git
Update .github/README.md
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>gaby/issue3095
parent
a29edcff99
commit
5aae1c9d9a
|
@ -645,10 +645,11 @@ import (
|
|||
|
||||
func main() {
|
||||
app := fiber.New(fiber.Config{
|
||||
// Trust all proxies (use with caution)
|
||||
// Configure trusted proxies - WARNING: Only trust proxies you control
|
||||
// Using TrustProxy: true with unrestricted IPs can lead to IP spoofing
|
||||
TrustProxy: true,
|
||||
TrustProxyConfig: fiber.TrustProxyConfig{
|
||||
Proxies: []string{"0.0.0.0", "1.1.1.1/30"}, // IP address or IP address range
|
||||
Proxies: []string{"10.0.0.0/8", "172.16.0.0/12"}, // Example: Internal network ranges only
|
||||
},
|
||||
ProxyHeader: fiber.HeaderXForwardedFor,
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue