Add X-Forwarded-Proto to nginx config to support SSL. Fixes #293
This commit is contained in:
parent
6c25eca2d6
commit
93a257707e
|
@ -13,7 +13,7 @@ server {
|
||||||
gzip_types application/json text/css application/x-javascript;
|
gzip_types application/json text/css application/x-javascript;
|
||||||
|
|
||||||
server_name meta.discourse.org;
|
server_name meta.discourse.org;
|
||||||
|
|
||||||
sendfile on;
|
sendfile on;
|
||||||
|
|
||||||
keepalive_timeout 65;
|
keepalive_timeout 65;
|
||||||
|
@ -36,7 +36,9 @@ server {
|
||||||
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header Host $http_host;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_set_header Host $http_host;
|
||||||
|
|
||||||
|
|
||||||
# If the file exists as a static file serve it directly without
|
# If the file exists as a static file serve it directly without
|
||||||
# running all the other rewite tests on it
|
# running all the other rewite tests on it
|
||||||
|
@ -48,7 +50,7 @@ server {
|
||||||
proxy_pass http://discourse;
|
proxy_pass http://discourse;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue