Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 14, 05:15 UTC
caddyhttp: Updated the documentation for MatchQuery (#4295)
Scott Mebberson committed
Aug 20, 2021 at 14:14 UTC
c1cd192ee760cf4ad4e6ca6021ceb86f03576e1e
1 file changed
+13
-1
modules/caddyhttp/matchers.go
+13
-1
@@ -82,7 +82,19 @@ type (
82
// MatchMethod matches requests by the method.
83
MatchMethod []string
84
85
- // MatchQuery matches requests by URI's query string.
85
+ // MatchQuery matches requests by the URI's query string. It takes a JSON object
86
+ // keyed by the query keys, with an array of string values to match for that key.
87
+ // Query key matches are exact, but wildcards may be used for value matches. Both
88
+ // keys and values may be placeholders.
89
+ // An example of the structure to match `?key=value&topic=api&query=something` is:
90
+ //
91
+ // ```json
92
+ // {
93
+ // "key": ["value"],
94
+ // "topic": ["api"],
95
+ // "query": ["*"]
96
+ // }
97
+ // ```
98
MatchQuery url.Values
99
100
// MatchHeader matches requests by header fields. It performs fast,