diff options
author | Arnaud Limbourg <arnaudlimbourg@users.noreply.github.com> | 2016-04-02 13:20:20 +0200 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2016-04-07 10:10:18 -0400 |
commit | 1920d4d5a8d69a488b59c7c4cd4f80a514fe2df8 (patch) | |
tree | a1db33c37d479c79d0116957245bd668a63af599 | |
parent | 13d1676498b6d4789c352cba48af1ce17b35820f (diff) | |
download | django-1920d4d5a8d69a488b59c7c4cd4f80a514fe2df8.tar.gz |
[1.9.x] Fixed #26037 -- Documented precedence of USE_X_FORWARDED_HOST/PORT settings.
Backport of 5cda4677b3df1be971000ef27470d3efc308d3be from master
-rw-r--r-- | docs/ref/settings.txt | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt index 4770bcea90..6044c4f7cf 100644 --- a/docs/ref/settings.txt +++ b/docs/ref/settings.txt @@ -2679,10 +2679,14 @@ See also :setting:`TIME_ZONE`, :setting:`USE_I18N` and :setting:`USE_L10N`. Default: ``False`` -A boolean that specifies whether to use the X-Forwarded-Host header in -preference to the Host header. This should only be enabled if a proxy +A boolean that specifies whether to use the ``X-Forwarded-Host`` header in +preference to the ``Host`` header. This should only be enabled if a proxy which sets this header is in use. +This setting takes priority over :setting:`USE_X_FORWARDED_PORT`. Per +:rfc:`7239#page-7`, the ``X-Forwarded-Host`` header can include the port +number, in which case you shouldn't use :setting:`USE_X_FORWARDED_PORT`. + .. setting:: USE_X_FORWARDED_PORT ``USE_X_FORWARDED_PORT`` @@ -2692,10 +2696,12 @@ which sets this header is in use. Default: ``False`` -A boolean that specifies whether to use the X-Forwarded-Port header in +A boolean that specifies whether to use the ``X-Forwarded-Port`` header in preference to the ``SERVER_PORT`` ``META`` variable. This should only be enabled if a proxy which sets this header is in use. +:setting:`USE_X_FORWARDED_HOST` takes priority over this setting. + .. setting:: WSGI_APPLICATION ``WSGI_APPLICATION`` |