Skip to content

Commit 81d8ac5

Browse files
committed
Refine the SECURE_PROXY_SSL_HEADER settings setup #384
Signed-off-by: Thomas Druez <tdruez@nexb.com>
1 parent 51c571e commit 81d8ac5

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

etc/nginx/conf.d/default.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ server {
88
location / {
99
proxy_pass http://gunicorn_app;
1010
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
11-
proxy_set_header X-Forwarded-Proto https;
1211
proxy_set_header Host $host;
1312
proxy_redirect off;
1413
client_max_body_size 10G;

scancodeio/settings.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@
108108

109109
WSGI_APPLICATION = "scancodeio.wsgi.application"
110110

111-
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
111+
SECURE_PROXY_SSL_HEADER = env.tuple(
112+
"SECURE_PROXY_SSL_HEADER", default=("HTTP_X_FORWARDED_PROTO", "https")
113+
)
112114

113115
# Database
114116

0 commit comments

Comments
 (0)