后台:修改白名单

This commit is contained in:
luying
2021-12-08 17:35:23 +08:00
parent fc38485f94
commit 46108f90f2
14 changed files with 56 additions and 43 deletions
+1 -6
View File
@@ -29,14 +29,12 @@ export default class Sdk extends Service {
public async pay37Callback(params: PayCallback37Data) {
const { ctx } = this;
const { app } = ctx;
let ip = typeof ctx.header['x-real-ip'] == 'string'? ctx.header['x-real-ip']: ctx.header['x-real-ip'][0];
console.log('*****pay37Callback', ip)
let checkResult = this.check37Sign(params);
if(!checkResult) return ctx.service.utils.resResult(PAY_37_CALLBACK_CODE.MD5_ERR, '');
console.log('*****pay37Callback check sign ok')
if(gameData.whiteip.indexOf(ip) == -1) {
if(gameData.whiteip.indexOf(ctx.clientIp) == -1) {
return ctx.service.utils.resResult(PAY_37_CALLBACK_CODE.IP_LIMIT, '');
}
@@ -95,9 +93,6 @@ export default class Sdk extends Service {
}
public treatRoleOrGuildNameValidate(params: RoleNameCallBackParam|GuildNameCallBackParam|GetGuildInfoByUserParam) {
const { ctx } = this;
let ip = ctx.header['x-real-ip'];
console.log('*****', ip)
if(!params.checkParams()) return SDK_37_TREAT_CODE.WRONG_PARAMS;