Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
@aaugustin aaugustin authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 docs/ref/request-response.txt
View
8 docs/ref/request-response.txt
@@ -193,10 +193,10 @@ Methods
.. method:: HttpRequest.get_host()
- Returns the originating host of the request using information from
- the ``HTTP_X_FORWARDED_HOST`` (if enabled in the settings) and ``HTTP_HOST``
- headers (in that order). If they don't provide a value, the method
- uses a combination of ``SERVER_NAME`` and ``SERVER_PORT`` as
+ Returns the originating host of the request using information from the
+ ``HTTP_X_FORWARDED_HOST`` (if :setting:`USE_X_FORWARDED_HOST` is enabled)
+ and ``HTTP_HOST`` headers, in that order. If they don't provide a value,
+ the method uses a combination of ``SERVER_NAME`` and ``SERVER_PORT`` as
detailed in :pep:`3333`.
Example: ``"127.0.0.1:8000"``

0 comments on commit 0519adb

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