We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a87261e commit ac0a38dCopy full SHA for ac0a38d
context.go
@@ -231,7 +231,7 @@ func (c *context) Scheme() string {
231
func (c *context) RealIP() string {
232
ra := c.request.RemoteAddr
233
if ip := c.request.Header.Get(HeaderXForwardedFor); ip != "" {
234
- ra = ip
+ ra = strings.Split(ip, ", ")[0]
235
} else if ip := c.request.Header.Get(HeaderXRealIP); ip != "" {
236
ra = ip
237
} else {
0 commit comments