chore: 佣金等级功能

This commit is contained in:
xiaojunnuo
2026-05-20 00:17:29 +08:00
parent 83a5a21f95
commit f4bb459b5e
17 changed files with 707 additions and 38 deletions
@@ -124,7 +124,9 @@ export class MainConfiguration {
this.app.getMiddleware().insertFirst(async (ctx: IMidwayKoaContext, next: NextFunction) => {
await next();
if (shouldSetDefaultNoCache(ctx.path, ctx.response.get('Cache-Control'))) {
const path = ctx.path;
// 如果是首页则强制设置为不缓存
if (path === '/' || path === '/index.html' || shouldSetDefaultNoCache(path, ctx.response.get('Cache-Control')) ) {
ctx.response.set('Cache-Control', 'public,max-age=0');
}
});