Update filter
This commit is contained in:
parent
ccec71ca9a
commit
7dfdaf5946
1 changed files with 5 additions and 1 deletions
|
|
@ -7,7 +7,11 @@ const API_URL = `${process.env.SEFINEK_API_URL}/cloudflare-waf-abuseipdb/post`;
|
||||||
|
|
||||||
module.exports = async () => {
|
module.exports = async () => {
|
||||||
const userIp = clientIp.getAddress();
|
const userIp = clientIp.getAddress();
|
||||||
const reportedIPs = readReportedIPs().filter(x => x.status === 'REPORTED' && x.ip !== userIp && !['//video', '//js', '//images', '//imgs', 'favicon.ico'].includes(x.endpoint) && !x.sefinekAPI);
|
const reportedIPs = readReportedIPs().filter(x =>
|
||||||
|
x.status === 'REPORTED' &&
|
||||||
|
x.ip !== userIp && !['//video', '//js', '//images', '//imgs', 'favicon.ico'].includes(x.endpoint) &&
|
||||||
|
!x.sefinekAPI);
|
||||||
|
|
||||||
if (reportedIPs.length === 0) return;
|
if (reportedIPs.length === 0) return;
|
||||||
|
|
||||||
const uniqueLogs = reportedIPs.reduce((acc, ip) => {
|
const uniqueLogs = reportedIPs.reduce((acc, ip) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue