Conversation
This property represents the IP closest to the user. This means it is potentially unsafe.
I don't think anyone has changed their minds about how useful this is, but it's always been something that's just a little bit useful, so no one has gotten around to implementing it. I'm happy to have a contribution for it.
Using the
I agree. But it is strange that this uses different rules than
"Unsafe" is OK, but it sounds a little too strong and scary. Maybe "untrusted" or "unverified"?
I'm not sure. It feels like they both belong in the same place, but on the other hand I prefer to put things on
Nah, I never really use draft PRs. |
This property represents the IP closest to the user. This means it is
potentially unsafe because clients can fake it but might be more useful for geolocation purposes.
Closes #904
Hi 👋!
This is my first attempt at contributing to tornado (long time user via JupyterHub and BinderHub). I picked #904 because it looked interesting and not too hard. However it is a very old issue so maybe thinking has moved on since then about how useful it is?
I thought I'd open this PR already to get some early feedback. I think if things look about right a better/more doc string is needed and maybe some more edge case test. Also need to look at availability of the
ipaddressmodule in terms of which versions tornado supports.I think it is ok to always provide this, not only when
xheaders=True, as it is always "unsafe" to look at this value/take it at face value.What do you think of the name of the new property? Is the
HTTPServerRequestclass the right place for this or should it be in the connection class like theremote_iphandling?(should this be a draft PR until it is ready for reviewing?)