Add X-Forwarded-Proto to nginx config to support SSL. Fixes #293

This commit is contained in:
Robin Ward 2013-02-28 11:24:03 -05:00
parent 6c25eca2d6
commit 93a257707e
1 changed files with 5 additions and 3 deletions

View File

@ -13,7 +13,7 @@ server {
gzip_types application/json text/css application/x-javascript;
server_name meta.discourse.org;
sendfile on;
keepalive_timeout 65;
@ -36,7 +36,9 @@ server {
proxy_set_header X-Real-IP $remote_addr;
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
# running all the other rewite tests on it
@ -48,7 +50,7 @@ server {
proxy_pass http://discourse;
break;
}
}
}