PonyConf: Tell Django when the request is from HTTPS.

This commit is contained in:
Julien Palard 2022-11-30 11:21:31 +01:00
parent ea39c0eb41
commit 13a14bf70f
Signed by: mdk
GPG Key ID: 0EFC1AC1006886F8

View File

@ -95,7 +95,7 @@
location / { location / {
proxy_pass http://unix:{{ ponyconf_home }}/ponyconf.sock; proxy_pass http://unix:{{ ponyconf_home }}/ponyconf.sock;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Forwarded-Protocol $scheme; proxy_set_header X-Forwarded-Proto $scheme;
} }
} }
@ -134,7 +134,7 @@
SECRET_KEY = "{{ ponyconf_secret }}" SECRET_KEY = "{{ ponyconf_secret }}"
ALLOWED_HOSTS = {{ ponyconf_sites | map(attribute='domain') | to_json }} ALLOWED_HOSTS = {{ ponyconf_sites | map(attribute='domain') | to_json }}
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
DEBUG = False DEBUG = False
LOGGING = { LOGGING = {
"version": 1, "version": 1,