From 5795a07a7d54a6290fb8a2970c485df1658dc900 Mon Sep 17 00:00:00 2001 From: Suzumiya Date: Mon, 5 Oct 2026 10:53:09 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E9=83=A8=E7=BD=B2):=20nginx=20SPA=20allowl?= =?UTF-8?q?ist=20=E8=A1=A5=20/games/lineage=EF=BC=88=E4=B8=89=E4=BB=BD?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E5=90=8C=E6=89=B9=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - `deploy/nginx/genarrative.conf:237`:allowlist 交替项插入 `games/lineage`(放在 `games/detail` 与 `games/mine` 之间,保持既有字典序) - `deploy/nginx/genarrative-dev-http.conf:209`:同上 - `deploy/container/nginx.conf:160`:同上(8 空格缩进,`~*` + `/?$` 形态不变) - 原因:M3 新增网页端 SPA 路由 `/games/lineage`(`src/routing/activeAppPageRoutes.ts:18`)后没同步三份 nginx 模板,`npm run check:nginx-spa-routes` 以 9 条断言失败(每份模板 3 条:缺少路由 / 未匹配完整路径 / 未允许大小写差异与尾部斜杠);CI run 3387 的 `Repository checks`(3m36s)即因此红,属本分支引入(master 尖端 `6c9566058` 8/8 绿) - 只补路由项,未改门禁脚本、未放宽任何断言、未动 `apps/**`、`server-rs/**`、`src/**` - 验证:`npm run check:nginx-spa-routes` → OK(15 SPA routes / 1 prefix routes / 3 Nginx templates) --- deploy/container/nginx.conf | 2 +- deploy/nginx/genarrative-dev-http.conf | 2 +- deploy/nginx/genarrative.conf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/deploy/container/nginx.conf b/deploy/container/nginx.conf index f9dd352eb..d9d79308e 100644 --- a/deploy/container/nginx.conf +++ b/deploy/container/nginx.conf @@ -157,7 +157,7 @@ http { try_files /index.html =404; } - location ~* "^/(?:creation|editor/canvas|pay|profile|profile/payment|project|components|design-system|games|games/detail|games/mine|games/play|games/publish)/?$" { + location ~* "^/(?:creation|editor/canvas|pay|profile|profile/payment|project|components|design-system|games|games/detail|games/lineage|games/mine|games/play|games/publish)/?$" { try_files $uri /index.html =404; } diff --git a/deploy/nginx/genarrative-dev-http.conf b/deploy/nginx/genarrative-dev-http.conf index e2879dff2..3e17fbf6f 100644 --- a/deploy/nginx/genarrative-dev-http.conf +++ b/deploy/nginx/genarrative-dev-http.conf @@ -206,7 +206,7 @@ server { try_files /index.html =404; } - location ~* "^/(?:creation|editor/canvas|pay|profile|profile/payment|project|components|design-system|games|games/detail|games/mine|games/play|games/publish)/?$" { + location ~* "^/(?:creation|editor/canvas|pay|profile|profile/payment|project|components|design-system|games|games/detail|games/lineage|games/mine|games/play|games/publish)/?$" { error_page 503 /maintenance.html; if ($genarrative_maintenance) { diff --git a/deploy/nginx/genarrative.conf b/deploy/nginx/genarrative.conf index 15d8c4d04..352be6f1d 100644 --- a/deploy/nginx/genarrative.conf +++ b/deploy/nginx/genarrative.conf @@ -234,7 +234,7 @@ server { try_files /index.html =404; } - location ~* "^/(?:creation|editor/canvas|pay|profile|profile/payment|project|components|design-system|games|games/detail|games/mine|games/play|games/publish)/?$" { + location ~* "^/(?:creation|editor/canvas|pay|profile|profile/payment|project|components|design-system|games|games/detail|games/lineage|games/mine|games/play|games/publish)/?$" { error_page 503 /maintenance.html; if ($genarrative_maintenance) {