]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Add HTTPServer(..., xheaders=True) to the web documentation.
authorBen Darnell <ben@bendarnell.com>
Thu, 19 Aug 2010 17:52:09 +0000 (13:52 -0400)
committerBen Darnell <ben@bendarnell.com>
Thu, 19 Aug 2010 17:52:09 +0000 (13:52 -0400)
website/templates/documentation.txt

index 5e8fc49dd37628febbe3a0bd66af88e23591a24a..1efe791edc3a430ec6362520dabbf05cd1ed0885 100644 (file)
@@ -753,6 +753,11 @@ and static file server. We run multiple instances of the Tornado web
 server on multiple frontend machines. We typically run one Tornado frontend
 per core on the machine (sometimes more depending on utilization).
 
+When running behind a load balancer like nginx, it is recommended to pass
+`xheaders=True` to the `HTTPServer` constructor.  This will tell Tornado
+to use headers like `X-Real-IP` to get the user's IP address instead of
+attributing all traffic to the balancer's IP address.
+
 This is a barebones nginx config file that is structurally similar to the
 one we use at FriendFeed. It assumes nginx and the Tornado servers
 are running on the same machine, and the four Tornado servers