WAF Auto-Block loads its configuration through the standard .NET configuration pipeline. Values are read fromDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/proteo5/waf-autoblock/llms.txt
Use this file to discover all available pages before exploring further.
appsettings.json, an optional appsettings.Development.json (or any environment-specific override file), and environment variables. Each source can override the previous one, so a value set in an environment variable always wins over one defined in any JSON file.
Configuration Sources
The precedence order from lowest to highest is:appsettings.json— baseline defaults committed to the repositoryappsettings.{Environment}.json— environment-specific overrides (e.g.appsettings.Production.json)appsettings.Local.json— local developer overrides, typically git-ignored- Environment variables — highest priority; always override file-based values
The
ASPNETCORE_ENVIRONMENT environment variable controls which environment-specific appsettings.{Environment}.json file is loaded. When not set, it defaults to Production.Top-Level Configuration Areas
The full JSON configuration shape across all sections looks like this:Cloudflare Settings
These four credentials are all required. The service callsIsConfigured() on startup and refuses to run if any of them is blank.
A Cloudflare API token with Zone:Read, Zone WAF:Read, and Account Firewall Access Rules:Edit permissions. Keep this value out of source control — supply it via an environment variable or a secrets manager.
The Cloudflare Zone ID for the zone whose WAF analytics the service will query. Found on the zone overview page in the Cloudflare dashboard under API > Zone ID.
The Cloudflare Account ID that owns the IP list used for blocking. Found on the account home page in the Cloudflare dashboard.
The identifier of the account-level IP list that blocked IPs are written to. Accepts either a UUID or a symbolic name prefixed with
$ (e.g. $auto_blocked_ips). When using Docker Compose .env files, escape the dollar sign as $$ to prevent variable substitution.Polling Settings
These values control how often the service queries Cloudflare WAF analytics and how far back each query looks.How many seconds the service waits between polling cycles. Shorter intervals increase Cloudflare API calls; 15 seconds is a sensible default for most deployments.
The lookback window in seconds applied to each WAF analytics query. The C# class default is
20, but appsettings.json sets this to 300 (5 minutes) and it is strongly recommended to set 300 explicitly in your configuration. Keep this aligned with HttpStatusDetection.WindowSeconds unless you have a specific reason to diverge.Maximum random delay added to each polling cycle before the Cloudflare API call is made. Jitter prevents thundering-herd behaviour in multi-instance or scheduled deployments. A value of
2000 means up to 2 seconds of random additional delay per cycle.Storage Settings
WAF Auto-Block uses SQLite to persist block state. The database records which IPs have been blocked and when each block expires, enabling TTL-based automatic unblocking across service restarts.Path to the SQLite database file. Can be relative (resolved from the working directory) or absolute. The service creates the parent directory automatically on first run if it does not already exist. When running in Docker, mount a volume at the parent directory to persist state across container restarts.
Learn More
WAF Rules
Configure which Cloudflare WAF rule IDs trigger automatic IP blocking and set per-rule thresholds and TTLs.
HTTP Status Detection
Enable per-IP HTTP error anomaly detection and distributed path scanning for additional coverage.
Environment Variables
Complete reference of every environment variable accepted by the service for Docker deployments.
appsettings.json
View the full JSON configuration shape with all sections and their defaults.