Authored by 姜枫

add anti spider config

... ... @@ -51,6 +51,11 @@ app.set('etag', false);
app.enable('trust proxy');
// 请求限制中间件
if (!app.locals.devEnv) {
app.use(require('./doraemon/middleware/limiter'));
}
// 指定libray目录
global.utils = path.resolve('./utils');
... ...
... ... @@ -107,7 +107,8 @@ module.exports = {
key: '7e6f3307b64cc87c79c472814b88f7fb',
appSecret: 'ce21ae4a3f93852279175a167e54509b',
notifyUrl: domains.service + 'payment/weixin_notify',
}
},
maxQps: 1200
};
if (isProduction) {
... ...
... ... @@ -45,7 +45,7 @@ module.exports = (limiter, policy) => {
}
if (pageIncr > 0) {
cache.incrAsync(key, pageIncr);
cache.incrAsync(key, pageIncr, (err) => {});
}
});
... ...