['//video', '//js', '//images', '//imgs'].includes(x.endpoint)

This commit is contained in:
Sefinek 2024-10-05 04:16:46 +02:00
parent 1372026986
commit 32b2c73b5b

View file

@ -7,7 +7,7 @@ const API_URL = `${process.env.SEFINEK_API_URL}/cloudflare-waf-abuseipdb/post`;
module.exports = async () => {
const userIp = clientIp.getAddress();
const reportedIPs = readReportedIPs().filter(x => x.status === 'REPORTED' && x.ip !== userIp && !x.sefinekAPI);
const reportedIPs = readReportedIPs().filter(x => x.status === 'REPORTED' && x.ip !== userIp && !['//video', '//js', '//images', '//imgs'].includes(x.endpoint) && !x.sefinekAPI);
if (reportedIPs.length === 0) return;
const uniqueLogs = reportedIPs.reduce((acc, ip) => {