Skip to main content

Documentation 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.

WAF Auto-Block exposes two HTTP endpoints for operational visibility. Both are read-only, lightweight, and safe to expose to internal monitoring systems. Neither endpoint returns secrets, API tokens, or raw Cloudflare API payloads.

Endpoints

GET /

Returns a minimal service banner that confirms the process is alive and identifies the runtime version. Response shape
{
  "service": "waf-autoblock",
  "status": "running",
  "runtime": "net10.0"
}

GET /status

Returns the current operational state of the background worker, including timing information for the most recent poll and cleanup cycles. Response fields
running
boolean
required
Always true when the service process is up and the HTTP stack is responding. If the service is unhealthy or has crashed, this endpoint will not respond at all.
startedAt
string (ISO 8601)
required
The UTC timestamp recorded when the service process started. Format: 2024-01-15T10:00:00+00:00.
lastSuccessfulPollAt
string | null (ISO 8601)
The UTC timestamp of the most recent Cloudflare analytics poll that completed without error. Returns null until the first successful poll cycle finishes after startup.
lastCleanupAt
string | null (ISO 8601)
The UTC timestamp of the most recent TTL cleanup pass that found and processed at least one expired entry (whether removed or deferred). Returns null until the first such cleanup pass runs after startup.
Example response
{
  "running": true,
  "startedAt": "2024-01-15T10:00:00+00:00",
  "lastSuccessfulPollAt": "2024-01-15T10:05:15+00:00",
  "lastCleanupAt": "2024-01-15T10:05:15+00:00"
}
lastSuccessfulPollAt is null until the first poll cycle completes without error. lastCleanupAt is null until the first cleanup pass that finds at least one expired entry runs.

Querying the Endpoint

Use any HTTP client to query /status. The endpoint accepts GET requests and returns application/json. curl
curl http://localhost:8080/status
PowerShell
Invoke-WebRequest -UseBasicParsing http://localhost:8080/status | Select-Object -ExpandProperty Content

Port Reference

The service listens on different ports depending on how it is started.
EnvironmentDefault PortNotes
Docker (container)8080Configured via the container’s ASPNETCORE_URLS or Dockerfile EXPOSE directive
Local development (dotnet run)5000ASP.NET Core default for non-container execution
When running via Docker, map the port at launch:
docker run -d \
  --name waf-autoblock \
  -p 8080:8080 \
  --env-file waf-autoblock.env \
  -v ${PWD}/data:/app/data \
  proteo5/waf-autoblock:latest

Monitoring Integration

The /status endpoint is designed for integration with uptime monitors, load balancer health checks, and alerting pipelines. A 200 OK response from / or /status confirms the service process is alive. The lastSuccessfulPollAt timestamp lets you verify that the background worker is actively polling, not just that the HTTP server is up.
Set lastSuccessfulPollAt age as a health threshold. If it hasn’t updated in more than 2× Polling.IntervalSeconds, polling may be stalled. Configure an alert to fire when (now − lastSuccessfulPollAt) > 2 × IntervalSeconds to catch credential failures, network outages, or Cloudflare API errors early.
A typical health check shell one-liner that exits non-zero if polling is stale by more than five minutes:
python3 -c "
import sys, json, urllib.request, datetime
r = json.loads(urllib.request.urlopen('http://localhost:8080/status').read())
last = r.get('lastSuccessfulPollAt')
if last is None:
    sys.exit(1)
age = (datetime.datetime.now(datetime.timezone.utc) - datetime.datetime.fromisoformat(last)).total_seconds()
sys.exit(0 if age < 300 else 1)
"

Build docs developers (and LLMs) love