🎈 perf(热更新): 添加白名单热更新地址

This commit is contained in:
luying
2022-11-23 11:38:22 +08:00
parent 6981b4c3e3
commit f1c6a658da
11 changed files with 33 additions and 209 deletions

View File

@@ -9,7 +9,7 @@ module.exports = () => {
if (serverId) {
let server = await ServerlistModel.findByServerId(serverId);
if (server && server.maintenance && server.maintenance.isOpen && server.maintenance.startTime < nowSeconds() && server.maintenance.endTime > nowSeconds()) {
let isWhiteList = await checkWhiteList(ctx.app.config.realEnv, ctx.clientIp, ctx.uid, serverId);
let isWhiteList = await checkWhiteList(ctx.app.config.realEnv, ctx.clientIp, ctx.uid);
if (isWhiteList) {
return await next();
} else {
@@ -17,7 +17,7 @@ module.exports = () => {
return;
}
} else if(server && server.openTime > nowSeconds()) {
let isWhiteList = await checkWhiteList(ctx.app.config.realEnv, ctx.clientIp, ctx.uid, serverId);
let isWhiteList = await checkWhiteList(ctx.app.config.realEnv, ctx.clientIp, ctx.uid);
if (isWhiteList) {
return await next();
} else {