BUGFIX: attempt to forward on the protocol set by haproxy
This commit is contained in:
parent
cac3257b43
commit
e8afe87412
|
@ -87,7 +87,14 @@ server {
|
|||
location @discourse {
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
# attempt to preserve the proto
|
||||
map $http_x_forwarded_proto $thescheme {
|
||||
default $scheme;
|
||||
https https;
|
||||
}
|
||||
|
||||
proxy_set_header X-Forwarded-Proto $thescheme;
|
||||
proxy_set_header Host $http_host;
|
||||
|
||||
proxy_pass http://discourse;
|
||||
|
|
Loading…
Reference in New Issue