Authored by yyq

change risk router key

... ... @@ -9,6 +9,7 @@ const cache = global.yoho.cache.master;
const helpers = global.yoho.helpers;
const pathToRegexp = require('path-to-regexp');
const logger = global.yoho.logger;
const md5 = require('md5');
const statusCode = {
code: 4403,
... ... @@ -83,7 +84,7 @@ module.exports = () => {
return next();
}
let keyPath = `${_.trim(path, '/').replace(/\//g, ':')}`;
let keyPath = md5(`${router.regRoute}`);
let limitKey = `pc:risk:limit:${keyPath}:${ip}`;
let configKey = `pc:risk:${keyPath}:${ip}`;
let checkUrl = helpers.urlFormat('/3party/check', {
... ...