Skip to content

Commit

Permalink
Merge branch 'force-rate-limit-domains' into release-v0.5.17
Browse files Browse the repository at this point in the history
  • Loading branch information
tombeynon committed May 27, 2024
2 parents f291c2b + 3075514 commit 09db2af
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions status/healthMonitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ function HealthMonitor() {
}
}
}
const RATE_LIMITED_DOMAINS = ['publicnode.com', 'pupmos.network']
const hostname = new URL(finalAddress).hostname
// Partial match hostname to avoid rate limiting
if(RATE_LIMITED_DOMAINS.some(domain => hostname.includes(domain))){
rateLimitedAt = Date.now()
}
rateLimited = rateLimitedAt && rateLimitedAt > Date.now() - 1000 * RATE_LIMIT_COOLDOWN

let nowAvailable = false;
Expand Down

0 comments on commit 09db2af

Please sign in to comment.