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) => {