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";