Rocket
Rocket copied to clipboard
Fix Request::client_ip for TLS connections
Request::client_ip
method currently always returns None
on TLS connections if no “real ip” header is configured/present, a regression compared to Rocket 0.5. That’s because the fallback assumes Request::remote
to return a TCP endpoint and won’t handle TLS endpoints correctly.
I considered changing Endpoint::tcp
(and Endpoint::unix
) method to automatically recurse for TLS endpoints instead but I doubt this is how the code logic there is supposed to be.