From 641acd8c9d84c649a12513cab0fc3f25d95bfa12 Mon Sep 17 00:00:00 2001 From: kangwenjing <1138819403@qq.com> Date: Tue, 8 Sep 2026 17:10:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=98=E5=8E=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/nginx/default.conf.template | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/frontend/nginx/default.conf.template b/frontend/nginx/default.conf.template index 048b537d..f8e57b79 100644 --- a/frontend/nginx/default.conf.template +++ b/frontend/nginx/default.conf.template @@ -7,20 +7,6 @@ server { resolver ${RESOLVER} valid=30s ipv6=off; - # 静态资源:命中直接返回文件并长时间缓存;缺失返回 404,绝不回退成 HTML, - # 避免 CDN/网关把误回退的 index.html 当资源缓存造成 MIME 报错。 - location /assets/ { - try_files $uri =404; - expires 1y; - add_header Cache-Control "public, max-age=31536000, immutable"; - access_log off; - } - - # index.html 不缓存,保证每次回源拿到最新 hash 引用。 - location = /index.html { - add_header Cache-Control "no-cache"; - } - location / { try_files $uri $uri/ /index.html; }