File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,6 +17,13 @@ def _multiline_to_list(s):
1717# Default to "development". Production _must_ set DATATRACKER_SERVER_MODE="production" in the env!
1818SERVER_MODE = os .environ .get ("DATATRACKER_SERVER_MODE" , "development" )
1919
20+ # Use X-Forwarded-Proto to determine request.is_secure(). This relies on CloudFlare overwriting the
21+ # value of the header if an incoming request sets it, which it does:
22+ # https://developers.cloudflare.com/fundamentals/reference/http-request-headers/#x-forwarded-proto
23+ # See also, especially the warnings:
24+ # https://docs.djangoproject.com/en/dev/ref/settings/#secure-proxy-ssl-header
25+ SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO" , "https" )
26+
2027# Secrets
2128_SECRET_KEY = os .environ .get ("DATATRACKER_DJANGO_SECRET_KEY" , None )
2229if _SECRET_KEY is not None :
You can’t perform that action at this time.
0 commit comments