@@ -831,7 +831,7 @@ app.Get("/", func(c fiber.Ctx) error {
831
831
## IsProxyTrusted
832
832
833
833
Checks trustworthiness of remote ip.
834
- If [` EnableTrustedProxyCheck ` ](fiber.md#enabletrustedproxycheck ) false, it returns true
834
+ If [` TrustProxy ` ](fiber.md#trustproxy ) false, it returns true
835
835
IsProxyTrusted can check remote ip by proxy ranges and ip map.
836
836
837
837
` ` ` go title=" Signature"
@@ -841,10 +841,13 @@ func (c Ctx) IsProxyTrusted() bool
841
841
` ` ` go title=" Example"
842
842
843
843
app := fiber.New (fiber.Config {
844
- // EnableTrustedProxyCheck enables the trusted proxy check
845
- EnableTrustedProxyCheck: true ,
846
- // TrustedProxies is a list of trusted proxy IP addresses
847
- TrustedProxies: []string {" 0.8.0.0" , " 0.8.0.1" },
844
+ // TrustProxy enables the trusted proxy check
845
+ TrustProxy: true ,
846
+ // TrustProxyConfig allows for configuring trusted proxies.
847
+ // Proxies is a list of trusted proxy IP ranges/addresses
848
+ TrustProxyConfig: fiber.TrustProxyConfig {
849
+ Proxies: []string {" 0.8.0.0" , " 0.8.0.1" },
850
+ }
848
851
})
849
852
850
853
@@ -1640,7 +1643,7 @@ app.Post("/", func(c fiber.Ctx) error {
1640
1643
Contains the request protocol string: http or https for TLS requests.
1641
1644
1642
1645
:::info
1643
- Please use [`Config.EnableTrustedProxyCheck `](fiber.md#enabletrustedproxycheck ) to prevent header spoofing, in case when your app is behind the proxy.
1646
+ Please use [`Config.TrustProxy `](fiber.md#trustproxy ) to prevent header spoofing, in case when your app is behind the proxy.
1644
1647
:::
1645
1648
1646
1649
```go title="Signature"
0 commit comments