Skip to content

Commit 2e7eb5b

Browse files
author
BuildTools
committed
more debugging
1 parent 4912f1b commit 2e7eb5b

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

data/lists/ipBlacklist.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[
2+
"2001:e68:5427:51d6:d8d2:8c0e:767a:4b6b",
3+
"2001:e68:5427:51d6:2d66:94f6:2f8b:f695",
4+
"2001:e68:5427:c50e:b852:2ee9:c30e:61e7"
5+
]

src/lists.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ const isBlacklisted = ip => {
9494
if(!returnVal && (ip == blIP || ip == resolveIP.hashIP(blIP)))
9595
returnVal = true;
9696
});
97+
98+
if(returnVal === true)
99+
debug("Lists", "Is blacklisted.");
100+
97101
return returnVal;
98102
}
99103

@@ -146,4 +150,4 @@ const isConsoleBlacklisted = ip => {
146150
return returnVal;
147151
}
148152

149-
module.exports = { init, isBlacklisted, isWhitelisted, isConsoleBlacklisted };
153+
module.exports = { init, isBlacklisted, isWhitelisted, isConsoleBlacklisted };

src/logRequest.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,16 @@ const logRequest = (type, additionalInfo, analyticsData) => {
123123
logChar = "*";
124124
if(!settings.logging.blacklistLoggingEnabled)
125125
logDisabled = true;
126+
127+
// analytics({
128+
// type: "Error",
129+
// data: {
130+
// ipAddress: analyticsData.ipAddress,
131+
// urlPath: analyticsData.urlPath,
132+
// urlParameters: analyticsData.urlParameters,
133+
// errorMessage: `Blacklisted - ${additionalInfo}`
134+
// }
135+
// });
126136
break;
127137
}
128138

@@ -166,4 +176,4 @@ const initMsg = (initTimestamp) => {
166176
}
167177

168178
module.exports = logRequest;
169-
module.exports.initMsg = initMsg;
179+
module.exports.initMsg = initMsg;

0 commit comments

Comments
 (0)