mirror of
https://github.com/gin-gonic/gin.git
synced 2025-05-23 13:29:35 +08:00
docs: fix case error of X-Real-IP (#4185)
Co-authored-by: voyager1 <voyager1@voyager1deMacBook-Pro.local>
This commit is contained in:
parent
3b28645dc9
commit
1eb827240e
@ -488,7 +488,7 @@
|
|||||||
- [FIX] Refactor render
|
- [FIX] Refactor render
|
||||||
- [FIX] Reworked tests
|
- [FIX] Reworked tests
|
||||||
- [FIX] logger now supports cygwin
|
- [FIX] logger now supports cygwin
|
||||||
- [FIX] Use X-Forwarded-For before X-Real-Ip
|
- [FIX] Use X-Forwarded-For before X-Real-IP
|
||||||
- [FIX] time.Time binding (#904)
|
- [FIX] time.Time binding (#904)
|
||||||
|
|
||||||
## Gin 1.1.4
|
## Gin 1.1.4
|
||||||
|
@ -889,7 +889,7 @@ func (c *Context) ShouldBindBodyWithPlain(obj any) error {
|
|||||||
|
|
||||||
// ClientIP implements one best effort algorithm to return the real client IP.
|
// ClientIP implements one best effort algorithm to return the real client IP.
|
||||||
// It calls c.RemoteIP() under the hood, to check if the remote IP is a trusted proxy or not.
|
// It calls c.RemoteIP() under the hood, to check if the remote IP is a trusted proxy or not.
|
||||||
// If it is it will then try to parse the headers defined in Engine.RemoteIPHeaders (defaulting to [X-Forwarded-For, X-Real-Ip]).
|
// If it is it will then try to parse the headers defined in Engine.RemoteIPHeaders (defaulting to [X-Forwarded-For, X-Real-IP]).
|
||||||
// If the headers are not syntactically valid OR the remote IP does not correspond to a trusted proxy,
|
// If the headers are not syntactically valid OR the remote IP does not correspond to a trusted proxy,
|
||||||
// the remote IP (coming from Request.RemoteAddr) is returned.
|
// the remote IP (coming from Request.RemoteAddr) is returned.
|
||||||
func (c *Context) ClientIP() string {
|
func (c *Context) ClientIP() string {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user