Update filter, payload

This commit is contained in:
Sefinek 2024-10-20 08:27:43 +02:00
parent 9aad704ac1
commit 8f84d9b5f7
2 changed files with 4 additions and 2 deletions

View file

@ -3,7 +3,7 @@ const query = `query ListFirewallEvents($zoneTag: string, $filter: FirewallEvent
zones(filter: { zoneTag: $zoneTag }) {
firewallEventsAdaptive(
filter: $filter,
limit: 1800,
limit: 1500,
orderBy: [datetime_DESC]
) {
action

View file

@ -9,10 +9,12 @@ module.exports = async () => {
const reportedIPs = readReportedIPs().filter(x =>
x.status === 'REPORTED' &&
x.ip !== clientIp.getAddress() &&
!x.endpoint.includes('/api') && // API requests
!['//video', '//js', '//images', '//imgs', 'favicon.ico'].some(endpoint => x.endpoint.includes(endpoint)) && // Endpoints
['api.', 'cdn.'].some(prefix => x.hostname.startsWith(prefix)) && // Domains
x.hostname !== 'blocklist.sefinek.net' && // Domain
!['Chrome/129', 'Chrome/130'].some(agent => x.useragent.includes(agent)) && // User-agents
!['Chrome/129', 'Chrome/130', 'Chrome/131', 'Chrome/132'].some(agent => x.useragent.includes(agent)) && // User-agents
!(/crawler|spider|bot/gi).test(x.useragent) && // Bots
!x.sefinekAPI
);
if (!reportedIPs.length) return;