Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Clarified which setting causes HttpRequest.get_host() to rely on the …

…HTTP_X_FORWARDED_HOST header.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17172 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 0519adb2a87090bd9ee3f61c7b9a6ff6de5fa341 1 parent 2693aa8
Aymeric Augustin authored December 07, 2011

Showing 1 changed file with 4 additions and 4 deletions. Show diff stats Hide diff stats

  1. 8  docs/ref/request-response.txt
8  docs/ref/request-response.txt
@@ -193,10 +193,10 @@ Methods
193 193
 
194 194
 .. method:: HttpRequest.get_host()
195 195
 
196  
-    Returns the originating host of the request using information from
197  
-    the ``HTTP_X_FORWARDED_HOST`` (if enabled in the settings) and ``HTTP_HOST``
198  
-    headers (in that order). If they don't provide a value, the method
199  
-    uses a combination of ``SERVER_NAME`` and ``SERVER_PORT`` as
  196
+    Returns the originating host of the request using information from the
  197
+    ``HTTP_X_FORWARDED_HOST`` (if :setting:`USE_X_FORWARDED_HOST` is enabled)
  198
+    and ``HTTP_HOST`` headers, in that order. If they don't provide a value,
  199
+    the method uses a combination of ``SERVER_NAME`` and ``SERVER_PORT`` as
200 200
     detailed in :pep:`3333`.
201 201
 
202 202
     Example: ``"127.0.0.1:8000"``

0 notes on commit 0519adb

Please sign in to comment.
Something went wrong with that request. Please try again.