FIX: Have nginx always pass /uploads/short-url requests to app.

Follow up to f0620e7118
This commit is contained in:
Guo Xiang Tan 2019-05-29 18:18:17 +08:00
parent 6be9a6eb2e
commit c920f9d137

View File

@ -91,11 +91,21 @@ server {
# auth_basic on;
# auth_basic_user_file /etc/nginx/htpasswd;
location ~ ^/uploads/short-url/ {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Request-Start "t=${msec}";
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $thescheme;
proxy_pass http://discourse;
break;
}
location ~* (assets|plugins|uploads)/.*\.(eot|ttf|woff|woff2|ico)$ {
expires 1y;
add_header Cache-Control public,immutable;
add_header Access-Control-Allow-Origin *;
}
}
location = /srv/status {
access_log off;