From 427d4878c7c68b29234185d465c2c1ee8bc6ca63 Mon Sep 17 00:00:00 2001 From: abcv7 Date: Thu, 27 Aug 2026 10:23:43 +0800 Subject: [PATCH] =?UTF-8?q?fix(ci):=20nginx=20index.html=20=E4=B8=8D?= =?UTF-8?q?=E7=BC=93=E5=AD=98=EF=BC=8C=E9=98=B2=E6=AD=A2=E9=83=A8=E7=BD=B2?= =?UTF-8?q?=E5=90=8E=E7=99=BD=E5=B1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/deploy-test.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/deploy-test.yml b/.gitea/workflows/deploy-test.yml index 2decff7..c43a65d 100644 --- a/.gitea/workflows/deploy-test.yml +++ b/.gitea/workflows/deploy-test.yml @@ -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/;