tmp
This commit is contained in:
@@ -50,7 +50,8 @@ class APP {
|
||||
// 同时提供 /health/static,避免独立 /static 请求落到其他服务的默认响应
|
||||
this.app.use(mount('/health/static', serve(STATIC_DIR)));
|
||||
this.app.use(mount('/static', serve(STATIC_DIR)));
|
||||
this.app.use(cors());
|
||||
// Web 后台(escort.huashengtec.com)跨域直连时需要 PATCH,koa-cors 默认不含
|
||||
this.app.use(cors({ methods: 'GET,HEAD,PUT,POST,DELETE,PATCH' }));
|
||||
this.app.use((ctx, next) => {
|
||||
const parser = LARGE_BODY_PREFIXES.some((prefix) => ctx.path.startsWith(prefix))
|
||||
? largeBodyParser
|
||||
|
||||
Reference in New Issue
Block a user