Skip to content

Commit 9c12e40

Browse files
committed
📚 Doc: Improve TrustProxy doc wording
1 parent b1bde88 commit 9c12e40

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,11 +333,11 @@ type Config struct { //nolint:govet // Aligning the struct fields is not necessa
333333
// If you are behind a proxy, you should enable TrustProxy to prevent header spoofing.
334334
// If you enable TrustProxy and do not provide a TrustProxyConfig, Fiber will skip
335335
// all headers that could be spoofed.
336-
// If request ip in TrustProxyConfig.Proxies allowlist, then:
336+
// If the request IP is in the TrustProxyConfig.Proxies allowlist, then:
337337
// 1. c.Scheme() get value from X-Forwarded-Proto, X-Forwarded-Protocol, X-Forwarded-Ssl or X-Url-Scheme header
338338
// 2. c.IP() get value from ProxyHeader header.
339339
// 3. c.Host() and c.Hostname() get value from X-Forwarded-Host header
340-
// But if request ip NOT in TrustProxyConfig.Proxies allowlist, then:
340+
// But if the request IP is NOT in the TrustProxyConfig.Proxies allowlist, then:
341341
// 1. c.Scheme() WON'T get value from X-Forwarded-Proto, X-Forwarded-Protocol, X-Forwarded-Ssl or X-Url-Scheme header,
342342
// will return https in case when tls connection is handled by the app, of http otherwise
343343
// 2. c.IP() WON'T get value from ProxyHeader header, will return RemoteIP() from fasthttp context

0 commit comments

Comments
 (0)