Skip to content

Commit

Permalink
Small doc fix on Context's ClientIP() method. (#3180)
Browse files Browse the repository at this point in the history
  • Loading branch information
jordan0day committed Jun 9, 2022
1 parent f2182de commit 6c3a1d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion context.go
Expand Up @@ -748,7 +748,7 @@ func (c *Context) ShouldBindBodyWith(obj any, bb binding.BindingBody) (err error
}

// ClientIP implements one best effort algorithm to return the real client IP.
// It called 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 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.
Expand Down

0 comments on commit 6c3a1d7

Please sign in to comment.