diff --git a/docs/ref/request-response.txt b/docs/ref/request-response.txt
index 1788e06..0540551 100644
a
|
b
|
Methods
|
202 | 202 | |
203 | 203 | Example: ``"127.0.0.1:8000"`` |
204 | 204 | |
| 205 | Warning: The ``get_host()`` method fails when the host is behind multiple |
| 206 | proxies. Specific middleware can be used to work around this problem, like so:: |
| 207 | |
| 208 | class MultipleProxyMiddleware(object): |
| 209 | FORWARDED_FOR_FIELDS = [ |
| 210 | 'HTTP_X_FORWARDED_FOR', |
| 211 | 'HTTP_X_FORWARDED_HOST', |
| 212 | 'HTTP_X_FORWARDED_SERVER', |
| 213 | ] |
| 214 | |
| 215 | def process_request(self, request): |
| 216 | """ |
| 217 | This middleware rewrites these proxy headers so that only the most |
| 218 | recent proxy is used. |
| 219 | """ |
| 220 | for field in self.FORWARDED_FOR_FIELDS: |
| 221 | if field in request.META: |
| 222 | if ',' in request.META[field]: |
| 223 | parts = request.META[field].split(',') |
| 224 | request.META[field] = parts[-1].strip() |
| 225 | |
| 226 | |
205 | 227 | .. method:: HttpRequest.get_full_path() |
206 | 228 | |
207 | 229 | Returns the ``path``, plus an appended query string, if applicable. |