Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed issue allowing to spoof ClientIP() #182

Merged
merged 1 commit into from
Dec 29, 2014

Conversation

nl5887
Copy link
Contributor

@nl5887 nl5887 commented Dec 21, 2014

The X-Forwarded-For can be used to spoof the real client ip. The middleware
introduced in this patch (which should only be used when having servers
in front of this servers) will filter all defined proxies (or local ip
addresses by default) and replace the RemoteAddr with the real client
ip.

The X-Forwared-For can be used to spoof the real client ip. The middleware
introduced in this patch (which should only be used when having servers
in front of this servers) will filter all defined proxies (or local ip
addresses by default) and replace the RemoteAddr with the real client
ip.
javierprovecho added a commit that referenced this pull request Dec 29, 2014
Fixed issue allowing to spoof ClientIP()
@javierprovecho javierprovecho merged commit 0099840 into gin-gonic:develop Dec 29, 2014
@manucorporat
Copy link
Contributor

This should be a core feature of Gin, not a middleware. Also, Gin should never modify http.Request, we work at different abstraction levels.

https://github.com/golang/go/blob/d5630142fdba6280c47458cf30165d3d62d44fc3/src/net/http/request.go#L203-L210

Most of this pull request will not be part of the v1 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants