From 3184f64a76bce5aa3a77441271a591be071896d0 Mon Sep 17 00:00:00 2001 From: lik Date: Tue, 3 Nov 2026 20:22:59 +0800 Subject: [PATCH] =?UTF-8?q?fix(training):=20=E9=80=9A=E8=BF=87=20health=20?= =?UTF-8?q?=E4=BB=A3=E7=90=86=E8=B7=AF=E5=BE=84=E6=8F=90=E4=BE=9B=E8=AF=81?= =?UTF-8?q?=E4=B9=A6=E6=A0=B7=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app.js b/app.js index c43d258..765b6d7 100644 --- a/app.js +++ b/app.js @@ -46,6 +46,9 @@ class APP { this.app.proxy = true; this.app.proxyIpHeader = "X-Real-IP"; + // 线上 nginx 只代理 /health 与 /user;保留 /static 供本机访问, + // 同时提供 /health/static,避免独立 /static 请求落到其他服务的默认响应 + this.app.use(mount('/health/static', serve(STATIC_DIR))); this.app.use(mount('/static', serve(STATIC_DIR))); this.app.use(cors()); this.app.use((ctx, next) => {