Remove the 'X-Forwarded-Proto' line from the nginx config

The reason is that in the default configuration nginx is only serving 'http' traffic.
So if an upstream proxy sets the 'X-Forwarded-Proto' header, because it is terminating
TLS, then nginx will overwrite it to 'http'. This will cause django to think the page
is served via 'http' and it will not create 'https://...' URLs.

Related to #292
This commit is contained in:
Christian Mäder 2020-06-02 16:06:52 +02:00
parent 03b36058cd
commit 5624ecc65e
2 changed files with 1 additions and 1 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@
.netbox
.initializers
docker-compose.override.yml
*.pem

View File

@ -29,7 +29,6 @@ http {
proxy_pass http://netbox:8001;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
add_header P3P 'CP="ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM NAV"';
}
}