Closed egorsmkv closed 7 years ago
Thanks for reporting. Can you contrib a patch? It should be as easy as extracting h, _, _ := net.SplitHostPort(r.RemoteAddr)
(used in several places) into a method.
Okay. I send PR, only later.
@ahmetalpbalkan I have my doubts.
Perhaps it's NGINX adds a comma to the original IP when proxying application.
you can just copy the logic in the other httpbin project, I think it's pretty standard.
Closing, feel free to send a patch if still interested.
Check this line: https://github.com/Runscope/httpbin/blob/master/httpbin/helpers.py#L184
For example: I send http request with proxy server and get this response:
I think you should add IP from
X-Forwarded-For
field toorigin
field.