Ticket #3225: middleware-meta.patch
File middleware-meta.patch, 891 bytes (added by , 18 years ago) |
---|
-
docs/middleware.txt
106 106 107 107 **New in Django development version** 108 108 109 Sets ``request['REMOTE_ADDR']`` based on ``request.['HTTP_X_FORWARDED_FOR']``, 110 if the latter is set. This is useful if you're sitting behind a reverse proxy 111 that causes each request's ``REMOTE_ADDR`` to be set to ``127.0.0.1``. 109 Sets ``request.META['REMOTE_ADDR']`` based on 110 ``request.META['HTTP_X_FORWARDED_FOR']``, if the latter is set. This is useful 111 if you're sitting behind a reverse proxy that causes each request's 112 ``REMOTE_ADDR`` to be set to ``127.0.0.1``. 112 113 113 114 **Important note:** This does NOT validate ``HTTP_X_FORWARDED_FOR``. If you're 114 115 not behind a reverse proxy that sets ``HTTP_X_FORWARDED_FOR`` automatically, do