mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
FIX: Have nginx always pass /uploads/short-url
requests to app.
Follow up to f0620e7118
This commit is contained in:
parent
6be9a6eb2e
commit
c920f9d137
1 changed files with 11 additions and 1 deletions
|
@ -91,6 +91,16 @@ server {
|
||||||
# auth_basic on;
|
# auth_basic on;
|
||||||
# auth_basic_user_file /etc/nginx/htpasswd;
|
# 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)$ {
|
location ~* (assets|plugins|uploads)/.*\.(eot|ttf|woff|woff2|ico)$ {
|
||||||
expires 1y;
|
expires 1y;
|
||||||
add_header Cache-Control public,immutable;
|
add_header Cache-Control public,immutable;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue