tomasen / realip

a golang library that can get client's real public ip address from http request headers
MIT License
221 stars 47 forks source link

Supporting multiple XFF entries #8

Open RobinNil opened 6 years ago

RobinNil commented 6 years ago

This is to add support/fix bugs for having multiple X-Forwarded-For entries. The commit message has details of the implementations.

There is a bug on the test case where "X-Forwarded-For" headers were not added (but were replaced instead): https://github.com/tomasen/realip/compare/master...RobinNil:master#diff-ffc776942d64deeeecf0f5ff91c039bfL55

RobinNil commented 6 years ago

@tomasen could you help review? thanks.

flyinprogrammer commented 6 years ago

This PR addresses all the concerns in https://github.com/tomasen/realip/issues/5