fix(web): /promotion 独立 try_files 防 SPA 误判;静态探测支持 Range 与 HTML 识别

Made-with: Cursor
This commit is contained in:
whm
2026-03-21 13:01:25 +08:00
parent d6767c2c5c
commit db3a8d8cd1
3 changed files with 36 additions and 13 deletions

View File

@@ -17,6 +17,12 @@ server {
add_header Cache-Control "public, immutable";
}
# 推广素材:文件必须真实存在,禁止落到 SPA index.html否则前端误判「静态存在」、视频拿到 HTML
location ^~ /promotion/ {
try_files $uri =404;
add_header Cache-Control "public, max-age=86400";
}
location = / {
try_files /index.html =404;
}