mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Fix #1630 short URL for file download conflicts with other nginx directives
다운로드 짧은주소는 /files/download/123/456/filename.jpg 와 같은 형태를 띠므로 nginx에서 특정 확장자에 캐싱 헤더 추가 등의 설정을 걸어놓은 경우 해당 설정이 짧은주소보다 먼저 적용되어 짧은주소에서 404 오류가 나는 문제 해결.
This commit is contained in:
parent
d3e390e3fe
commit
459fe2d959
2 changed files with 10 additions and 0 deletions
|
|
@ -25,6 +25,11 @@ location ~ ^/rhymix/(.+)\.min\.(css|js)$ {
|
|||
try_files $uri $uri/ /rhymix/$1.$2;
|
||||
}
|
||||
|
||||
# fix download URL when other directives for static files are present
|
||||
location ~ ^/rhymix/files/download/ {
|
||||
try_files $uri $uri/ /rhymix/index.php$is_args$args;
|
||||
}
|
||||
|
||||
# all other short URLs
|
||||
location /rhymix/ {
|
||||
try_files $uri $uri/ /rhymix/index.php$is_args$args;
|
||||
|
|
|
|||
|
|
@ -25,6 +25,11 @@ location ~ ^/(.+)\.min\.(css|js)$ {
|
|||
try_files $uri $uri/ /$1.$2;
|
||||
}
|
||||
|
||||
# fix download URL when other directives for static files are present
|
||||
location ~ ^/files/download/ {
|
||||
try_files $uri $uri/ /index.php$is_args$args;
|
||||
}
|
||||
|
||||
# all other short URLs
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php$is_args$args;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue