Authored by 周少峰

Merge branch 'hotfix/limiter'

... ... @@ -2,7 +2,7 @@
const robotCheckService = require('../models/robot-check-service');
const captchaService = require('../../passport/controllers/captcha');
const logger = global.yoho.logger;
const index = (req, res, next) => {
let channel = req.yoho.channel || 'boys';
... ... @@ -27,6 +27,7 @@ const isHuman = (req, res) => {
remoteIp = arr[0];
}
logger.info('isHuman', remoteIp);
robotCheckService.removeBlack(remoteIp).then(() => {
return res.json({
code: 200
... ...
... ... @@ -172,7 +172,7 @@ module.exports = {
},
REQUEST_LIMIT: {
// 10s 最多访问5次
10: 8,
10: 10,
// 30s 最多访问15次
30: 20,
... ...