BUGFIX: attempt to forward on the protocol set by haproxy
This commit is contained in:
parent
cac3257b43
commit
e8afe87412
|
@ -37,7 +37,7 @@ server {
|
|||
|
||||
location / {
|
||||
root $public;
|
||||
|
||||
|
||||
location ~* \.(eot|ttf|woff)$ {
|
||||
add_header Access-Control-Allow-Origin *;
|
||||
expires 1y;
|
||||
|
@ -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