Authored by 陈峰

limit log

... ... @@ -48,6 +48,7 @@ module.exports = (limiter, policy) => {
if (!results[key]) {
operation.push(cache.setAsync(cacheKey, 1, +key));
} else if (+results[key] > +val) {
logger.warn(`${config.app}:limiter:${limiter.remoteIp}`);
// ip限制1小时
operation.push(cache.setAsync(`${config.app}:limiter:${limiter.remoteIp}`, 1, limiterIpTime));
... ...