mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 12:42:16 +08:00
FIX: Serve .ico files without nginx 404 for secure media uploads (#8826)
Add nginx location to handle /secure-media-uploads/ requests .ico files were getting a 404 when being looked for via /secure-media-uploads/. this nginx config addition fixes the issue.
This commit is contained in:
parent
8d77e99827
commit
c994fd1b01
|
@ -104,6 +104,16 @@ server {
|
|||
break;
|
||||
}
|
||||
|
||||
location ~ ^/secure-media-uploads/ {
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user