Skip to content

Instantly share code, notes, and snippets.

@felinx
Created April 2, 2011 05:23
Show Gist options
  • Save felinx/899253 to your computer and use it in GitHub Desktop.
Save felinx/899253 to your computer and use it in GitHub Desktop.
Get self.request.remote_ip when running tornado behind a reverse proxy
# To get remote_ip, it should set xheaders=True when initializing HTTPServer
http_server = HTTPServer(Application(), xheaders=True)
@felinx
Copy link
Author

felinx commented Apr 5, 2011

It's work!
Test gist comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment