mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-12 14:37:17 +03:00
Changed getIP to be all lowercase
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
var fs = require('fs');
|
||||
var config = require('../config.js');
|
||||
|
||||
module.exports = function getIP(req) {
|
||||
@@ -6,11 +5,11 @@ module.exports = function getIP(req) {
|
||||
|
||||
switch (config.behindProxy) {
|
||||
case "X-Forwarded-For":
|
||||
return req.headers['X-Forwarded-For'];
|
||||
return req.headers['x-forwarded-for'];
|
||||
case "Cloudflare":
|
||||
return req.headers['CF-Connecting-IP'];
|
||||
return req.headers['cf-connecting-ip'];
|
||||
case "X-Real-IP":
|
||||
return req.headers['X-Real-IP'];
|
||||
return req.headers['x-real-ip'];
|
||||
default:
|
||||
return req.connection.remoteAddress;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user