realip
realip copied to clipboard
a golang library that can get client's real public ip address from http request headers
when looping throught the X-Forwarded-For header what if the user changed the header with so many "," won't that make the loop take time to finish, and therefore a performance...
The problem with "realip" is, what if I fake the IP header values like "X-Real-Ip"? Nice work by the way.
In my mac, all I see is 127.0.0.1 for the IP address instead of my real IP address. Is that how it's supposed to work?
It's better to use semantic versioning with git tags - `dep` and `go mod` will automatically fetch tags as available versions. Tag is immutable (until force push used), so it's...
I am a bot. Please reach out to [@azillion](https://github.com/azillion) if you have any issues, or just close the PR.
This isn't affecting me (or I'd send a pull request), but I believe instead of bypassing RemoteAddr if X-Forwarded-For or X-Real-Ip header exists you should test whether RemoteAddr is public....
* use cananicalised form of http header * add gp deps files * added test of wher x-forwarded constain more then 1 Ip address * there is a also a...
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...
https://github.com/tomasen/realip/blob/master/realip_test.go#L55 This line will override every value, failing the intent of the test. Should have been string concatenated first. Final value for this(https://github.com/tomasen/realip/blob/master/realip_test.go#L80) line is 119.14.55.11