fix(ci): nginx index.html 不缓存,防止部署后白屏
deploy-test / build-and-deploy-test (push) Successful in 3m43s
deploy-test / build-and-deploy-test (push) Successful in 3m43s
This commit is contained in:
@@ -124,6 +124,18 @@ jobs:
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml image/svg+xml;
|
||||
gzip_min_length 256;
|
||||
|
||||
# 管理后台入口文件不缓存
|
||||
location = /admin/index.html {
|
||||
alias /usr/share/nginx/html/admin/index.html;
|
||||
add_header Cache-Control "no-cache, must-revalidate";
|
||||
}
|
||||
|
||||
# 管理后台 (Vue3 SPA)
|
||||
location /admin/ {
|
||||
alias /usr/share/nginx/html/admin/;
|
||||
try_files $uri $uri/ /admin/index.html;
|
||||
}
|
||||
|
||||
# 后端 SDK 静态文件
|
||||
location /tac/ {
|
||||
root /usr/share/nginx/html;
|
||||
@@ -139,12 +151,6 @@ jobs:
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
# 管理后台 (Vue3 SPA)
|
||||
location /admin/ {
|
||||
alias /usr/share/nginx/html/admin/;
|
||||
try_files $uri $uri/ /admin/index.html;
|
||||
}
|
||||
|
||||
# 管理后台 API 反代
|
||||
location ^~ /admin/api/ {
|
||||
proxy_pass http://tianai-captcha:18200/api/;
|
||||
|
||||
Reference in New Issue
Block a user