From 3bc9fdade8bce12f492e6bcfc5f3ce4557032e25 Mon Sep 17 00:00:00 2001 From: OmarAhmadyar Date: Mon, 9 Jun 2025 08:16:59 -0700 Subject: [PATCH] Add documentation for empty query match (#473) --- src/docs/markdown/caddyfile/matchers.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/docs/markdown/caddyfile/matchers.md b/src/docs/markdown/caddyfile/matchers.md index ae919e8..53e62b4 100644 --- a/src/docs/markdown/caddyfile/matchers.md +++ b/src/docs/markdown/caddyfile/matchers.md @@ -776,12 +776,13 @@ With a [CEL expression](#expression): ```caddy-d query =... +query "" expression query({'': ''}) expression query({'': ['']}) ``` -By query string parameters. Should be a sequence of `key=value` pairs. Keys are matched exactly (case-sensitively) but also support `*` to match any value. Values can use placeholders. +By query string parameters. Should be a sequence of `key=value` pairs, or an empty string "". Keys are matched exactly (case-sensitively) but also support `*` to match any value. Values can use placeholders. Empty string matches http requests with no query parameters. There can be multiple `query` matchers per named matcher, and pairs with the same keys will be OR'ed together. Different keys will be AND'ed together. So, all keys in the matcher must have at least one matching value.