mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-06 19:47:00 +03:00
Added string check to getIP
This commit is contained in:
committed by
GitHub
parent
9a317a2c23
commit
ad7d1a53d9
@@ -2,7 +2,7 @@ var fs = require('fs');
|
||||
var config = require('../config.js');
|
||||
|
||||
module.exports = function getIP(req) {
|
||||
if (config.behindProxy === true) config.behindProxy = "X-Forwarded-For";
|
||||
if (config.behindProxy === true || config.behindProxy === "true") config.behindProxy = "X-Forwarded-For";
|
||||
|
||||
switch (config.behindProxy) {
|
||||
case "X-Forwarded-For":
|
||||
|
||||
Reference in New Issue
Block a user