Skip to content

Instantly share code, notes, and snippets.

@jinuljt
Created May 30, 2019 17:52
Show Gist options
  • Save jinuljt/7a759a5ba14e63b5a0caace6473869c8 to your computer and use it in GitHub Desktop.
Save jinuljt/7a759a5ba14e63b5a0caace6473869c8 to your computer and use it in GitHub Desktop.
tornado xheaders
app.listen(xheaders=True)

If xheaders is True, we support the X-Real-Ip/X-Forwarded-For and X-Scheme/X-Forwarded-Proto headers, which override the remote IP and URI scheme/protocol for all requests. These headers are useful when running Tornado behind a reverse proxy or load balancer. The protocol argument can also be set to https if Tornado is run behind an SSL-decoding proxy that does not set one of the supported xheaders.

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