Skip to content
Myr

docs: fix case error of X-Real-IP (#4185)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by NezhaFan · committed by GitHub · parent 3b28645 · Browse files · 2 files+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Co-authored-by: voyager1 <voyager1@voyager1deMacBook-Pro.local>

Diff stats

2 files+2 added−2 removed

  • other:+2 added−2 removed

2 files+2 added−2 removed

modified:CHANGELOG.md+1 added-1 removed
486 unmodified lines
487- [DEPRECATE] On next release: \*context.BindWith(), see #855488- [FIX] Refactor render489- [FIX] Reworked tests490- [FIX] logger now supports cygwin491- [FIX] Use X-Forwarded-For before X-Real-Ip491- [FIX] Use X-Forwarded-For before X-Real-IP492- [FIX] time.Time binding (#904)493494## Gin 1.1.4495
164 unmodified lines
modified:context.go+1 added-1 removed
887 unmodified lines
888}889890// ClientIP implements one best effort algorithm to return the real client IP.891// It calls c.RemoteIP() under the hood, to check if the remote IP is a trusted proxy or not.892// If it is it will then try to parse the headers defined in Engine.RemoteIPHeaders (defaulting to [X-Forwarded-For, X-Real-Ip]).892// If it is it will then try to parse the headers defined in Engine.RemoteIPHeaders (defaulting to [X-Forwarded-For, X-Real-IP]).893// If the headers are not syntactically valid OR the remote IP does not correspond to a trusted proxy,894// the remote IP (coming from Request.RemoteAddr) is returned.895func (c *Context) ClientIP() string {896 // Check if we're running on a trusted platform, continue running backwards if error
464 unmodified lines