diff --git a/config/nginx.sample.conf b/config/nginx.sample.conf index 1d16b0b32..90aec737c 100644 --- a/config/nginx.sample.conf +++ b/config/nginx.sample.conf @@ -100,6 +100,7 @@ server { location = /srv/status { access_log off; log_not_found off; + proxy_http_version 1.1; 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; @@ -135,7 +136,7 @@ server { # # proxy_set_header DOES NOT inherit, by design, we must repeat it, # otherwise headers are not set correctly -# + proxy_http_version 1.1; 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; @@ -167,6 +168,7 @@ server { } location ~ ^/admin/backups/ { + proxy_http_version 1.1; 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; @@ -181,6 +183,7 @@ server { # acceleration for backups and avatars # see note about repetition above location ~ ^/(letter_avatar/|user_avatar|highlight-js|stylesheets|favicon/proxied) { + proxy_http_version 1.1; 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; @@ -218,9 +221,16 @@ server { proxy_set_header Connection ""; proxy_pass https://avatars.discourse.org/; + break; } + # we need buffering off for 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_pass http://discourse; break; @@ -240,7 +250,6 @@ server { 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_set_header Connection ""; proxy_http_version 1.1; proxy_pass http://discourse; }