mirror of
https://github.com/pretix/pretix.git
synced 2026-08-29 13:44:40 +00:00
Add support for X-Forwarded-Host
This commit is contained in:
@@ -106,6 +106,11 @@ Example::
|
|||||||
proxy that actively removes and re-adds the header to make sure the correct value is set.
|
proxy that actively removes and re-adds the header to make sure the correct value is set.
|
||||||
Defaults to ``off``.
|
Defaults to ``off``.
|
||||||
|
|
||||||
|
``trust_x_forwarded_host``
|
||||||
|
Specifies whether the ``X-Forwarded-Host`` header can be trusted. Only set to ``on`` if you have a reverse
|
||||||
|
proxy that actively removes and re-adds the header to make sure the correct value is set.
|
||||||
|
Defaults to ``off``.
|
||||||
|
|
||||||
``csp_log``
|
``csp_log``
|
||||||
Log violations of the Content Security Policy (CSP). Defaults to ``on``.
|
Log violations of the Content Security Policy (CSP). Defaults to ``on``.
|
||||||
|
|
||||||
|
|||||||
@@ -178,6 +178,8 @@ if SITE_URL.endswith('/'):
|
|||||||
CSRF_TRUSTED_ORIGINS = [urlparse(SITE_URL).hostname]
|
CSRF_TRUSTED_ORIGINS = [urlparse(SITE_URL).hostname]
|
||||||
|
|
||||||
TRUST_X_FORWARDED_FOR = config.get('pretix', 'trust_x_forwarded_for', fallback=False)
|
TRUST_X_FORWARDED_FOR = config.get('pretix', 'trust_x_forwarded_for', fallback=False)
|
||||||
|
USE_X_FORWARDED_HOST = config.get('pretix', 'trust_x_forwarded_host', fallback=False)
|
||||||
|
|
||||||
|
|
||||||
REQUEST_ID_HEADER = config.get('pretix', 'request_id_header', fallback=False)
|
REQUEST_ID_HEADER = config.get('pretix', 'request_id_header', fallback=False)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user