Caddy Warden Changelog & Release Notes
All notable changes to the Caddy Warden module (github.com/routewarden/caddy-warden) are documented here.
The format is based on Keep a Changelog, and Caddy Warden adheres to Semantic Versioning.
[v1.8.0] - 2026-10-30 (Latest)
Added
- AI Bot & Web Crawler Defense:
- Added native detection and blocking of automated LLM scrapers and AI crawlers (
block_ai_botsdirective). - Built-in multi-tier AI bot registry supporting profiles:
train_only(default, blocks mass training harvesters likeGPTBot,ClaudeBot,Bytespider,CCBot,Diffbot),all(blocks all training and search bots includingPerplexityBotandOAI-SearchBot),aggressive(blocks aggressive scrapers disregarding crawl delays), andcustom(ai_bot_profiledirective). - Added custom User-Agent pattern blocking via
block_user_agents <patterns...>and allowlisting viaallow_user_agents <patterns...>. Allowed User-Agents take strict precedence over bot blocking rules.
- Added native detection and blocking of automated LLM scrapers and AI crawlers (
- Negative ASN Filtering (
blocked_asns):- Added native Caddyfile directive
blocked_asns <asns...>to block client IP addresses belonging to hostile Autonomous Systems, cloud hosting providers, or bot-heavy networks (e.g.blocked_asns AS138699 14061) via local offline ASN snapshot (asn_db).
- Added native Caddyfile directive
- Active Deception Response Modes (
aiPoison&markovTarpit):- Added
mode aiPoison: Serves HTTP 200 withX-Robots-Tag: noindex, nofollow, noaiand hidden adversarial prompt-injection payloads that instruct LLMs and automated retrieval agents to purge and disregard scraped content. - Added
mode markovTarpit: Procedural pseudo-coherent Markov word generator streaming words at controlled trickle intervals (tarpit_delay_ms), locking scraper worker threads without high CPU overhead.
- Added
- Honeypot Spider Traps & In-Memory IP Ban Table:
- Added
honeypot_trap_paths <paths...>directive to configure invisible honeytoken trap links (e.g./hidden-trap,/crawler-trap/). - Added thread-safe, bounded in-memory sliding-window IP ban table: any crawler touching a honeypot path is automatically banned for
trap_ban_duration(default:24h), intercepting and dropping all subsequent requests at Stage 1.
- Added
- Search Engine Impersonator Verification via FCrDNS (
verify_search_engine_bots):- Added Forward-Confirmed Reverse DNS (FCrDNS) verification directive
verify_search_engine_bots true|false. - Automatically verifies clients presenting User-Agents for recognized search engines (
Googlebot,bingbot,Applebot) via reverse DNS PTR validation and forward IP matching against genuine domain suffixes (.googlebot.com,.google.com,.search.msn.com,.applebot.apple.com). - Employs a thread-safe in-memory cache (6 hours TTL, 10,000 entries) with strict query timeouts (500ms) to eliminate per-request DNS latency.
- Exempts genuine verified search crawlers while dropping spoofed scrapers with reason
search_engine_spoofed.
- Added Forward-Confirmed Reverse DNS (FCrDNS) verification directive
- Browser Impersonation Detection (
detect_browser_impersonation):- Added
detect_browser_impersonation true|falsedirective to detect and block bots disguising themselves with desktop/mobile browser User-Agents. - Cross-validates Client Hints (
Sec-CH-UA-Platformmatching OS in User-Agent,Sec-CH-UA-Mobileform factor consistency,Sec-CH-UApresence on modern Chromium $\ge 89$, and brand integrity), Chromium Fetch Metadata (Sec-Fetch-Site,Sec-Fetch-Mode,Sec-Fetch-Dest), and mandatory companion headers (Accept-Language,Accept-Encoding).
- Added
- Script Client & Headless Automation Blocking (
block_script_clients):- Added
block_script_clients true|falsedirective to block requests originating from programmatic HTTP client libraries (Pythonrequests,urllib,aiohttp,httpx,Scrapy,curl-cffi,mechanize, PHPGuzzle, Rustreqwest, Nodeaxios,node-fetch,undici, GoGo-http-client, JavaOkHttp,curl,wget) and headless automation frameworks (X-Playwright,X-Puppeteer,X-Selenium,X-Cypress,X-Headless-Chrome,X-Automation,Sec-WebDriver).
- Added
- Edge robots.txt Dynamic Honeypot Injection (
enable_robots_txt_honeypot):- Added
enable_robots_txt_honeypot true|falseandrobots_txt_honeypot_secret <string>Caddyfile directives. - Dynamically injects daily rotating
Disallow: /_rw_trap_<token>/bait with HMAC-SHA256 rotation and UTC rollover tolerance, trapping non-compliant scrapers intoBanTable.
- Added
- 10-Engine Global FCrDNS Verification (
verify_search_engine_bots):- Expanded search engine verification to 10 global engines: Google, Bing, Apple, Yandex, Baidu, DuckDuckGo, Yahoo, Naver, Sogou, and Mojeek.
- Chromium GREASE & Header Order Anomaly Detection (
detect_browser_impersonation):- Added Chromium GREASE brand validation (
missing_grease_brand) and HTTP header order anomaly detection (header_order_anomaly).
- Added Chromium GREASE brand validation (
- Datacenter & Cloud Hosting IP Classification (
block_cloud_hosts):- Added
block_cloud_hosts true|falsedirective to classify and block datacenter scrapers and browser impersonators from AWS, GCP, Azure, Hetzner, DigitalOcean, OVH, Linode, Oracle, ByteDance, with FCrDNS exemptions for legitimate search crawlers.
- Added
- Cryptographic Proof-of-Work Challenge Mode (
powChallenge/pow_challenge):- Added
mode powChallengewith Caddyfile subdirectives:pow_difficulty <int>,pow_secret <string>,pow_timeout_seconds <int>. - Serves zero-dependency Web Crypto Hashcash solver (<2KB) returning HTTP 429, allowing solved
rw_powcookie to bypass route blocks while keeping honeypot traps and hard IP bans immutable.
- Added
[v1.7.0] - 2026-10-27
Added
- Offline ASN-Based Allowlisting (
allowed_asns/asn_db):- Added Autonomous System Number (ASN) based allowlisting using an offline, in-memory JSON routing snapshot (
asn_db), eliminating runtime DNS lookups and external HTTP latency. - Added native Caddyfile directives
allowed_asns <asns...>andasn_db <path>to configure allowed ASNs (e.g.allowed_asns AS64500 64501) and point to the routing snapshot. - Added support for clearing inherited allowlists: declaring a bare
allowed_asnsdirective in nested route blocks explicitly clears any inherited ASN allowlist. - Supported native Caddy JSON configuration API via
allowed_asnsandasn_dbkeys, with cross-engine alias compatibility (allowedASNs,asnDB) when loading sharedconfig_fileJSON manifests. - Implemented longest-prefix routing table lookup in Go across dual-stack IPv4 and IPv6 address spaces, including IPv4-mapped IPv6 addresses.
- Preserved strict routing hierarchy: child subnets allocated to non-allowed ASNs cannot inherit parent ASN bypasses. Conflicting prefix origins are rejected at startup.
- Resilient client IP extraction: evaluates socket peer IP unless
trusted_proxies/trustedProxiesare configured. Never relies on spoofable client-supplied ASN headers. - Bundled database compilation utility
scripts/build-asn-db.pyto convert MaxMind GeoLite2/GeoIP2 ASN Blocks CSV files into JSON routing snapshots.
- Added Autonomous System Number (ASN) based allowlisting using an offline, in-memory JSON routing snapshot (
Fixed & Enhanced
- IPv6 Scope & Zone Index Stripping:
- Sanitized zone identifiers (
%interface, e.g.%eth0) in client IPv6 addresses during ASN radix-tree lookup, preventingnet.ParseIPevaluation errors on scoped link-local and dual-stack addresses.
- Sanitized zone identifiers (
- Caddyfile Parsing & Explicit Field Tracking:
- Implemented
markExplicitfield tracking to reliably distinguish explicitly declared Caddyfile directives from defaults when overriding settings on top of a sharedconfig_fileJSON base policy. - Added native Caddyfile parsing for top-level directives
status_code,custom_response_text,redirect_url, andproxy_url, automatically synchronizing them withrw.Responseconfiguration. - Added robust case-insensitive parsing for
silentDrop(silent_drop,silentdrop,drop).
- Implemented
- AI Bot & Crawler Defense Architecture:
- Documented active defense strategies (reverse slowloris tarpitting, gzip bombs, ASN gating) and architecture roadmap for AI crawler mitigation.
- Comprehensive Unit Testing:
- Added extensive test coverage for Caddyfile directive parsing, explicit field inheritance, response mode fallback hierarchy, and ASN filter resolution.
[v1.6.2] - 2026-10-21
Fixed
- Directive Order Precedence (
reverse_proxyInterception):- Updated directive registration from
Before, "respond"toBefore, "reverse_proxy". This ensures Routewarden intercepts and blocks malicious requests before Caddy forwards them to upstream backend servers.
- Updated directive registration from
config_fileCaddy Zap Logger Restoration:- Fixed an issue where Caddy's provisioned Zap logger on
rwwas clobbered by the zero-value logger in*rw = fileCfg, restoring structured access and security logging for sites utilizingconfig_file.
- Fixed an issue where Caddy's provisioned Zap logger on
- Caddyfile Parser HTTP Methods Defaulting:
- Prevented
UnmarshalCaddyfilefrom unconditionally defaultingrw.Methods = []string{"GET"}whenconfig_fileis specified, allowing custom HTTP methods defined in the JSON configuration file to take effect.
- Prevented
- Inline Caddyfile Flag Overrides with
config_file:- Fixed an issue where loading
config_filediscarded inline Caddyfile directives. Inline settings (security_log,status_code,enabled) now properly override file configurations.
- Fixed an issue where loading
- Default Status Code Resolution & Synchronization:
- Fixed status code mode defaults bypassing explicit response configs when
respCfg.StatusCode == 0. Synchronized top-levelstatus_codeparsing directly toResponse.StatusCode.
- Fixed status code mode defaults bypassing explicit response configs when
- Wildcard HTTP Method Matching:
- Added support for
*andALLin monitored methods (isMethodMonitored), enabling inspection across all HTTP methods.
- Added support for
- Resilient Client IP Extraction:
- Enhanced
ExtractClientIPto iterate comma-separatedX-Forwarded-Fortokens and select the first syntactically valid IP, preventing corrupt IPs from malformed headers.
- Enhanced
- Snake-Case Schema Parity in
ResponseConfig:- Added custom JSON unmarshaling to
ResponseConfigsupporting bothsnake_case(e.g.,gzip_ratio,status_code,redirect_url) andcamelCasekeys.
- Added custom JSON unmarshaling to
- Tarpit Timer Resource Leak:
- Replaced
time.Afterin tarpit chunk streaming withtime.NewTimerand explicit deferred cleanup, preventing timer accumulation under heavy concurrency.
- Replaced
- Boolean Flag Parsing for
debug:- Added boolean argument parsing to the
debugdirective (debug false,debug off), avoiding unintentional enablement.
- Added boolean argument parsing to the
- Body Buffer Preservation on Stream Read Errors:
- Ensured partially-read request body bytes are preserved and readable by downstream handlers even when reading encounters an error prior to EOF.
- Accurate Path Tracking in Security Logs:
- Fixed security event logging where the
pathfield was overwritten by query string or body match targets. Thepathfield now strictly recordsr.URL.Pathwith matched payload fragments recorded inmatched_target.
- Fixed security event logging where the
[v1.6.1] - 2026-10-20
Added
- Official Multi-Arch Docker Packaging & GHCR Publishing:
- Added multi-stage
Dockerfilebased oncaddy:2.11.7-builderandcaddy:2.11.7-alpine. - Added GitHub Actions release workflow publishing multi-architecture (
linux/amd64,linux/arm64) container images to GitHub Container Registry (ghcr.io/routewarden/caddy-warden) on release tags. - Added PR validation job in CI to verify container build integrity.
- Added multi-stage
- Base Caddy Version Upgrade:
- Upgraded base Caddy image reference to
2.11.7.
- Upgraded base Caddy image reference to
[v1.6.0] - 2026-10-20
Added
- Fractional & Floating Point Gzip Decompression Bomb Sizing (
gzip_bomb_mb):- Added floating-point support for
gzip_bomb_mbin Caddyfile parsing (strconv.ParseFloat) andGzipBombMB float64inResponseConfig. - Supports fractional sizes (e.g.
gzip_bomb_mb 0.5for a 512KB payload / 16 chunks). - Hardened
totalChunkscalculation with a safe minimum chunk floor (totalChunks = 1), preventing zero or negative chunk streaming on sub-megabyte inputs. - Updated dual-tag JSON schema bindings (
GzipBombMB *float64/GzipBombMBSnake *float64) for both camelCase and snake_case configurations. - Added comprehensive test coverage in
caddyfile_test.go(TestCaddyfile_GzipBombMB_Float) andresponse_handler_test.go.
- Added floating-point support for
[v1.5.1] - 2026-10-19
Fixed
- Gzip Decompression Bomb (
gzip_bomb/bomb) Status Code Default:- Fixed
gzip_bombmode defaulting to403instead of200 OKwhenstatus_codeis omitted, enticing crawlers to process the compression payload and inflate the bomb in memory. - Custom user-configured
status_codevalues remain respected when provided. - Added safe fallback in
ServeBlockedRequestensuringhttp.StatusOKis written ifstatus_codeis0.
- Fixed
- Configuration File Merging & Schema Parity (
config_file):- Added full dual-tag schema support (
sharedResponseConfig) for standardsnake_caseJSON properties insideresponseblocks (status_code,redirect_url,proxy_url,gzip_bomb_mb,retry_after_seconds, etc.), ensuring full cross-engine compatibility with Traefik, NGINX, and CLI configurations.
- Added full dual-tag schema support (
- Case-Insensitive Captcha Mode Template Compilation:
- Fixed case-sensitive comparison (
respCfg.Mode == "captcha") inNewResponseHandler, ensuringmode "Captcha"and"CAPTCHA"properly initialize the challenge template instead of falling back to raw plaintext.
- Fixed case-sensitive comparison (
[v1.5.0] - 2026-10-16
Key Highlights
- File-Based Configuration (
config_file):- Added new
config_fileCaddyfile directive andconfig_fileJSON field toRoutewarden. When set, Routewarden loads the specifiedroutewarden.jsonas the base configuration duringProvision(). - Inline Caddyfile / JSON API values take precedence over the file, enabling a shared policy file with per-site Caddyfile overrides.
- Empty/omitted inline directives defer to the file — no need to repeat
block_patternsjust to changemode. - Missing or malformed files cause an immediate provisioning error with a descriptive message.
- Added new
[v1.4.1] - 2026-10-07
Key Highlights
- Strict Status Code Canonicalization (
status_code):- Removed deprecated
statusalias at the root Caddyfile directive level and withinresponse { ... }blocks in favor of strictly canonicalstatus_code <int>. - Added unit test coverage confirming that deprecated
statusandpath_patternsdirectives fail Caddyfile parsing with clear unrecognized directive errors.
- Removed deprecated
- Canonical Directive Cleanup & Verification:
- Replaced legacy
path_patternsreferences across test fixtures and sample Caddyfiles with canonicalblock_patterns. - Added comprehensive test suites verifying
block_patternsandallow_patternsmatching, query parameter filtering, and exact regex rule evaluation.
- Replaced legacy
[v1.4.0] - 2026-10-05
Key Highlights
route_wardenDirective & Module ID Registration:- Registered both
"route_warden"and"routewarden"directives with Caddyfile parser (httpcaddyfile.RegisterHandlerDirective), enabling standard snake_case Caddyfile configuration blocks (route_warden { ... }) as documented. - Registered Caddy module alias
http.handlers.route_wardenin addition tohttp.handlers.routewarden, allowing native Caddy JSON configuration blocks ("handler": "route_warden") to resolve cleanly.
- Registered both
- Canonical Directive Standardization & Duplicate Alias Removal:
- Standardized Caddyfile and JSON directives on
enable_default_patternsandenable_default_allow_patterns. - Standardized on single canonical
block_patternsdirective replacing legacy aliases (path_patterns,block_pattern). - Standardized on
mode(replacingaction),status_code(replacingstatus),check_body_patterns(replacingbody_patterns), andcheck_body_max_bytes. - Removed deprecated duplicate aliases across structs and Caddyfile unmarshaler.
- Standardized Caddyfile and JSON directives on
[v1.3.1] - 2026-10-02
Key Highlights
- Protocol-Relative Open Redirect Prevention (
redirectUrl):- Hardened redirect URL validation in
response_handler.goagainst protocol-relative URL evasion vectors (e.g.//attacker.com). - Restricts relative redirects strictly to single-slash prefixes (
/...) and safely falls back to/if protocol-relative destinations are specified, mitigating open-redirect exploitation.
- Hardened redirect URL validation in
- Security Log Schema Normalization (
level: "warn"):- Added
"level": "warn","status_code", and"matched_pattern"across both Caddy's Zap logger and stdout JSONL logs. - Ensures full schema alignment with Traefik Warden, NGINX Warden, TCP Warden, and Routewarden observability stacks.
- Added
- CI / Version Scripting Portability:
- Improved in-place sed editing in
scripts/update-version.shfor reliable multi-platform execution across macOS (BSD) and Linux (GNU).
- Improved in-place sed editing in
[v1.3.0] - 2026-10-01
Key Highlights
- Trusted Proxies Support (
trusted_proxies/trusted_proxy):- Added native Caddyfile directives
trusted_proxies <ips/cidrs...>andtrusted_proxy <ips/cidrs...>alongside JSON configuration support. - Forwarded headers (
X-Forwarded-ForandX-Real-IP) are now strictly honored only when the direct socket connection (RemoteAddr) originates from an explicitly trusted proxy or subnet. - Eliminates client IP spoofing risks and ensures unauthorized clients directly reaching Caddy cannot bypass
allowed_ipsfilters by injecting forwarding headers.
- Added native Caddyfile directives
- Redirect Mode Security Hardening (
redirectUrl):- Added strict validation for
redirectUrlin response handlers, enforcinghttp://,https://, or root-relative paths (/...). - Blocks unsafe URL schemes (e.g.
javascript:) to eliminate open-redirect and client-side execution vectors.
- Added strict validation for
- Silent Drop Connection Fallback:
- Added non-hijackable connection fallback for
silentDrop: if Caddy's HTTP hijacker cannot acquire the raw connection (e.g. over HTTP/2, HTTP/3, or wrapped response writers), Routewarden responds with HTTP 200 OK and an empty body rather than leaking the blocking status code.
- Added non-hijackable connection fallback for
- Captcha Template Error Handling:
- Added Zap structured error logging when CAPTCHA template rendering encounters an error, with an immediate fallback to a clean, well-formed HTML security challenge document.
- Flexible Silent Drop Directives:
- Recognized case-insensitive aliases
silent_drop,silentdrop, anddropin both Caddyfile and JSON configurations, canonicalizing automatically tosilentDrop.
- Recognized case-insensitive aliases
- Header Candidate Path Expansion:
- Automatically includes raw header values in candidate path evaluation before tokenization for complete inspection parity across reverse-proxy headers.
[v1.2.1] - 2026-09-24
Key Highlights
- Query Parameter Attack Surface Hardening (
check_query):- Validates both parameter keys and parameter values.
- Prevents evasion attempts where sensitive targets are passed as query keys (e.g.,
/?key=val&.env=). - Added recursive anti-evasion normalization for candidate query parameter paths.
- Client IP Extraction & Port/Bracket Normalization (
cleanIP):- Handles client IPs with embedded ports (
192.168.1.1:8080) or bracketed IPv6 formats ([2001:db8::1]) from reverse proxies or CDNs before CIDR evaluation.
- Handles client IPs with embedded ports (
- Response Modes & Silent Drop Parity (
mode silentDrop):- Standardized modern
mode silentDropsyntax in Caddyfile and JSON configurations.
- Standardized modern
- Honeypot Evaluation Scope (
fakeSuccess):- Evaluates both normalized URL paths and raw request URIs to ensure honeypot decoys cannot be bypassed via URI manipulation.
- Caddyfile Configuration Hardening:
- Added singular directive aliases (
path_pattern,block_pattern,allow_pattern,allowed_ip) for configuration convenience. - Enforced top-level status code validation in
Validate().
- Added singular directive aliases (
[v1.2.0] - 2026-09-24
Key Highlights
- Routewarden CLI (
rwarden generate --target caddy):- Added direct compilation from universal
routewarden.jsonpolicy manifests into nativeroute_wardenCaddyfile blocks.
- Added direct compilation from universal
- Caddyfile Block Parsing Enhancements (
caddyfile.go):- Enhanced parsing for nested response settings, headers, and custom tarpit/captcha properties.
- Unified Versioning Automation:
- Integrated
scripts/update-version.shfor atomic updates acrossversion.json,README.md, and Caddy docs.
- Integrated
[v1.1.0] - 2026-09-20
Key Highlights
- Expanded Default Block Patterns:
- Built-in coverage for private keys (
*.pem,*.key), container manifests (Dockerfile*,docker-compose*.yml),.DS_Store, and CMS configs (wp-config.php*,settings.py).
- Built-in coverage for private keys (
- Header Smuggling Protection (
check_headers):- Configurable header list (
X-Forwarded-Uri,X-Rewrite-URL,X-Original-URL, etc.) with recursive normalization.
- Configurable header list (
- Path Normalizer Fuzz Testing:
- Integrated fuzz testing (
FuzzExtractCandidatePaths) for Caddy URL normalization pipelines.
- Integrated fuzz testing (
[v1.0.0] - 2026-09-20
Key Highlights
- Official Caddy v2 Module GA Release:
- Seamless integration via
xcaddy build --with github.com/routewarden/caddy-warden. - Native
route_wardenCaddyfile directive and dynamic Caddy JSON API support. - Full support for all 13 response modes (
tarpit,gzipBomb,fakeSuccess,captcha,silentDrop, etc.). - Automatic order declaration:
order route_warden before reverse_proxy. - Structured security logging (
security_log true) compatible with CrowdSec.
- Seamless integration via
[v0.3.x Series] (Archived)
- HTTP Method Constraints (
method <verbs...>): Granular verb filtering in Caddyfile and JSON matchers. - Diagnostic Logging (
debug true): Verbose stdout diagnostic traces of candidate path transformations. - CrowdSec Auto-Ban Logging (
security_log true): Emits single-line JSON block audit events to stdout.