FIX: pretending to support too many accelerated files

This broke sidekiq web

(sidekiq serves resources out of /vendor/ path)
This commit is contained in:
Sam 2014-07-11 18:47:55 +10:00
parent c113c36db7
commit d9768a6195
1 changed files with 5 additions and 4 deletions

View File

@ -75,6 +75,8 @@ server {
} }
location ~ ^/uploads/ { location ~ ^/uploads/ {
proxy_set_header X-Sendfile-Type X-Accel-Redirect;
proxy_set_header X-Accel-Mapping $public/=/downloads/;
expires 1y; expires 1y;
add_header Cache-Control public; add_header Cache-Control public;
@ -99,7 +101,9 @@ server {
break; break;
} }
location ~ ^/backups/ { location ~ ^/(backups|letter_avatar|user_avatar) {
proxy_set_header X-Sendfile-Type X-Accel-Redirect;
proxy_set_header X-Accel-Mapping $public/=/downloads/;
proxy_pass http://discourse; proxy_pass http://discourse;
break; break;
} }
@ -117,9 +121,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 X-Sendfile-Type X-Accel-Redirect;
# required at parent level as various routes take advantage
proxy_set_header X-Accel-Mapping $public/=/downloads/;
proxy_pass http://discourse; proxy_pass http://discourse;
} }