Fix entry.action === 'TOO_MANY_REQUESTS'
This commit is contained in:
parent
e961a77c4e
commit
c2f3f89bc9
1 changed files with 1 additions and 1 deletions
2
index.js
2
index.js
|
|
@ -30,7 +30,7 @@ const fetchBlockedIPs = async () => {
|
|||
};
|
||||
|
||||
const isIPReportedRecently = (ip, reportedIPs) => {
|
||||
const lastReport = reportedIPs.find(entry => entry.ip === ip && (entry.action === 'REPORTED' || entry.action.startsWith('TOO_MANY_REQUESTS')));
|
||||
const lastReport = reportedIPs.find(entry => entry.ip === ip && (entry.action === 'REPORTED' || entry.action === 'TOO_MANY_REQUESTS'));
|
||||
if (lastReport) {
|
||||
const lastTimestamp = new Date(lastReport.timestamp).getTime();
|
||||
const currentTime = Date.now();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue