clean up config file

This commit is contained in:
Sam 2016-01-04 16:13:44 +11:00
parent 0e2ded278d
commit b8471177dc

View file

@ -100,6 +100,7 @@ server {
location = /srv/status { location = /srv/status {
access_log off; access_log off;
log_not_found off; log_not_found off;
proxy_http_version 1.1;
proxy_set_header Host $http_host; proxy_set_header Host $http_host;
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;
@ -135,7 +136,7 @@ server {
# #
# proxy_set_header DOES NOT inherit, by design, we must repeat it, # proxy_set_header DOES NOT inherit, by design, we must repeat it,
# otherwise headers are not set correctly # otherwise headers are not set correctly
# proxy_http_version 1.1;
proxy_set_header Host $http_host; proxy_set_header Host $http_host;
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;
@ -167,6 +168,7 @@ server {
} }
location ~ ^/admin/backups/ { location ~ ^/admin/backups/ {
proxy_http_version 1.1;
proxy_set_header Host $http_host; proxy_set_header Host $http_host;
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;
@ -181,6 +183,7 @@ server {
# acceleration for backups and avatars # acceleration for backups and avatars
# see note about repetition above # see note about repetition above
location ~ ^/(letter_avatar/|user_avatar|highlight-js|stylesheets|favicon/proxied) { location ~ ^/(letter_avatar/|user_avatar|highlight-js|stylesheets|favicon/proxied) {
proxy_http_version 1.1;
proxy_set_header Host $http_host; proxy_set_header Host $http_host;
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;
@ -218,9 +221,16 @@ server {
proxy_set_header Connection ""; proxy_set_header Connection "";
proxy_pass https://avatars.discourse.org/; proxy_pass https://avatars.discourse.org/;
break;
} }
# we need buffering off for message bus
location /message-bus/ { location /message-bus/ {
proxy_set_header Host $http_host;
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 $thescheme;
proxy_http_version 1.1;
proxy_buffering off; proxy_buffering off;
proxy_pass http://discourse; proxy_pass http://discourse;
break; break;
@ -240,7 +250,6 @@ 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 X-Forwarded-Proto $thescheme; proxy_set_header X-Forwarded-Proto $thescheme;
proxy_set_header Connection "";
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_pass http://discourse; proxy_pass http://discourse;
} }