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

support x-real-ip #541

Closed
wants to merge 1 commit into from
Closed

support x-real-ip #541

wants to merge 1 commit into from

Conversation

atian25
Copy link

@atian25 atian25 commented Oct 23, 2015

No description provided.

@slaskis
Copy link
Contributor

slaskis commented Oct 23, 2015

I would move that code into get ips() instead.

@atian25
Copy link
Author

atian25 commented Oct 23, 2015

@slaskis if x-forward-for[0] != x-real-ip then ?

@slaskis
Copy link
Contributor

slaskis commented Oct 23, 2015

well in your PR you prioritise x-real-ip anyway. So if you would add that first as the first option in get ips() it should have the same effect.

@atian25
Copy link
Author

atian25 commented Oct 23, 2015

ok, so get ips() should add x-real-ip when x-forward-for[0] != x-real-ip.

x-real-ip = '100.100.100.100'
x-forward-for = '200.200.200.200,300.300.300.300'
`get ips()` = ['100.100.100.100', '200.200.200.200','300.300.300.300'] 

@tj
Copy link
Member

tj commented Oct 23, 2015

sounds redundant, why not just use x-forwarded-for? from the cases I'm seeing x-real-ip == the first in x-forwarded-for

@jonathanong
Copy link
Member

i'd also prefer if this logic was in a separate module. see:

@atian25
Copy link
Author

atian25 commented Oct 27, 2015

copy~

@atian25 atian25 closed this Oct 27, 2015
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.

4 participants