后台:修改白名单
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user