Closed kanak closed 3 years ago
I don't think that should be baked in: the remote address really is the load balancer. If applications want to use the "X-Real-IP" (or whatever custom header their load balancer uses), then it's pretty simple for them to wrap the code appropriately. I know some web frameworks have support for this and they support a number of different "no, really this IP" but not by default (it can be spoofed etc)... so I think this is something that Seasocks won't handle itself. Sorry!
... will just return the IP address and port of the load balancer.
I'm migrating from tornado web server, which has an option to respect the X-Real-Ip, X-Forwarded-For headers:
https://www.tornadoweb.org/en/stable/httpserver.html#tornado.httpserver.HTTPServer
I'm currently doing a quick and dirty
conn->getHeaeder("X-Real-IP")
, but maybe this should be baked in?