mirror of
https://github.com/gofiber/fiber.git
synced 2025-07-11 21:18:07 +00:00
Update .github/README.md
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
parent
a29edcff99
commit
5aae1c9d9a
5
.github/README.md
vendored
5
.github/README.md
vendored
@ -645,10 +645,11 @@ import (
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
app := fiber.New(fiber.Config{
|
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,
|
TrustProxy: true,
|
||||||
TrustProxyConfig: fiber.TrustProxyConfig{
|
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,
|
ProxyHeader: fiber.HeaderXForwardedFor,
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user