Skip to content

Commit d6290cf

Browse files
committed
remove last commit
1 parent 4aac7d7 commit d6290cf

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

worker.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -227,13 +227,6 @@ function getBannerMessage(env, state, host) {
227227

228228
export default {
229229
async fetch(request, env, ctx) {
230-
// Block unwanted IPs early to save quota (e.g., UniFi/Pterodactyl health checks)
231-
const clientIp = request.headers.get('CF-Connecting-IP');
232-
const blockedIps = env.BLOCKED_IPS ? env.BLOCKED_IPS.split(',').map(ip => ip.trim()) : [];
233-
if (clientIp && blockedIps.includes(clientIp)) {
234-
return new Response(null, { status: 204 }); // No Content - fast rejection
235-
}
236-
237230
const host = request.headers.get('host');
238231
const url = new URL(request.url);
239232

wrangler.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,6 @@ ENABLE_UPS_BANNER = true
3434
TEXT_UPS_BANNER_MESSAGE = "Le serveur fonctionne batterie. Une coupure de courant est en cours !"
3535

3636

37-
# Blocked IPs (comma-separated) - requests from these IPs will be rejected immediately
38-
# Example: IPs from UniFi/Pterodactyl containers that generate useless errors
39-
# Set this as a secret on Cloudflare dashboard: wrangler secret put BLOCKED_IPS
40-
# BLOCKED_IPS = "ip1,ip2,ip3"
41-
4237
# Enable or disable the error reporting functionality
4338
ENABLE_REPORT_ERROR = true
4439
# Discord webhook URL for error reports

0 commit comments

Comments
 (0)