From: Ben Darnell Date: Thu, 19 Aug 2010 17:52:09 +0000 (-0400) Subject: Add HTTPServer(..., xheaders=True) to the web documentation. X-Git-Tag: v1.1.0~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e10c31fe8307f0e532eb2783dfad299029df11f;p=thirdparty%2Ftornado.git Add HTTPServer(..., xheaders=True) to the web documentation. --- diff --git a/website/templates/documentation.txt b/website/templates/documentation.txt index 5e8fc49dd..1efe791ed 100644 --- a/website/templates/documentation.txt +++ b/website/templates/documentation.txt @@ -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