Showing
1 changed file
with
1 additions
and
1 deletions
@@ -20,7 +20,7 @@ const limiter = (rule, policy, context) => { | @@ -20,7 +20,7 @@ const limiter = (rule, policy, context) => { | ||
20 | }; | 20 | }; |
21 | 21 | ||
22 | module.exports = (req, res, next) => { | 22 | module.exports = (req, res, next) => { |
23 | - let remoteIp = req.get('X-Forwarded-For'); | 23 | + let remoteIp = req.get('X-Forwarded-For') || req.get('X-Real-IP') || ''; |
24 | 24 | ||
25 | if (remoteIp.indexOf(',') > 0) { | 25 | if (remoteIp.indexOf(',') > 0) { |
26 | let arr = remoteIp.split(','); | 26 | let arr = remoteIp.split(','); |
-
Please register or login to post a comment