remove http 1.1 in case it has side effects

This commit is contained in:
Sam 2016-01-05 07:54:12 +11:00
parent 29e5ab0121
commit 268e0f3b2b

View File

@ -100,7 +100,6 @@ 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;
@ -136,7 +135,6 @@ 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;
@ -168,7 +166,6 @@ 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;
@ -183,7 +180,6 @@ 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;
@ -217,7 +213,6 @@ server {
proxy_cache_key $uri; proxy_cache_key $uri;
proxy_cache_valid 200 7d; proxy_cache_valid 200 7d;
proxy_cache_valid 404 1m; proxy_cache_valid 404 1m;
proxy_http_version 1.1;
proxy_set_header Connection ""; proxy_set_header Connection "";
proxy_pass https://avatars.discourse.org/; proxy_pass https://avatars.discourse.org/;
@ -250,7 +245,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_http_version 1.1;
proxy_pass http://discourse; proxy_pass http://discourse;
} }