Authored by 姜枫

fix remote ip

... ... @@ -20,7 +20,7 @@ const limiter = (rule, policy, context) => {
};
module.exports = (req, res, next) => {
let remoteIp = req.get('X-Forwarded-For');
let remoteIp = req.get('X-Forwarded-For') || req.get('X-Real-IP') || '';
if (remoteIp.indexOf(',') > 0) {
let arr = remoteIp.split(',');
... ...