From 4eae38763a2c8fdc684f7d72bbb78d628df295d3 Mon Sep 17 00:00:00 2001 From: xiaolipro <2357729423@qq.com> Date: Mon, 7 Sep 2026 15:56:06 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9Atz?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .dockerignore | 2 +- nginx-k3s.conf | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.dockerignore b/.dockerignore index 3e1087f..4caeb06 100644 --- a/.dockerignore +++ b/.dockerignore @@ -16,7 +16,7 @@ npm-debug.log* pnpm-debug.log* docs -IDE* +# 勿写 IDE*:会误伤官网目录「IDE官网」,导致 / 探针 404 xhs-agent-desktop **/*.md !src/**/*.md diff --git a/nginx-k3s.conf b/nginx-k3s.conf index 6ab37e8..9ef5d41 100644 --- a/nginx-k3s.conf +++ b/nginx-k3s.conf @@ -11,7 +11,8 @@ server { root /usr/share/nginx/html; location = / { - try_files /site/index.html =404; + # 官网优先;缺失时回退 SPA,避免 readiness 探针 404 + try_files /site/index.html /index.html =404; add_header Cache-Control "no-cache, no-store, must-revalidate"; add_header Pragma "no-cache"; add_header Expires "0";