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

api: fix remote addr shows reverse proxy addr problem #410

Merged
merged 1 commit into from
Jun 21, 2017

Conversation

KeyboardNerd
Copy link
Contributor

Uses the first ip addr in X-forwarded-for as the client's remote addr if it exists
otherwise, fall back to use default http.Request.RemoteAddr

@jzelinskie
Copy link
Contributor

Let's move this code so that it's a subdirectory of api. Maybe we can call it httputil, so that we can put other stuff besides IP-related stuff in the package.

@jzelinskie jzelinskie self-requested a review June 12, 2017 15:20
Uses the first ip addr in X-forwarded-for as the client's remote addr if it exists
otherwise, fall back to use default http.Request.RemoteAddr
@jzelinskie jzelinskie merged commit 33c6234 into quay:master Jun 21, 2017
KeyboardNerd pushed a commit to KeyboardNerd/clair that referenced this pull request Feb 2, 2018
api: fix remote addr shows reverse proxy addr problem
@KeyboardNerd KeyboardNerd deleted the xforward branch March 11, 2018 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants