@marcel91200 / caddy Mirror · read-only / commits / 657f0cab
Fork 0

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

docs: Clarify "not" matcher structure (see #3233)

Matthew Holt committed Apr 6, 2020 at 18:44 UTC 657f0cab17c1597f4f78f15d0b720aa6f9d7fbcb
1 file changed +14
modules/caddyhttp/matchers.go
+14
@@ -114,6 +114,20 @@ type (
114 // true, the final result of the "not" matcher is false. Individual
115 // matchers within a set work the same (i.e. different matchers in
116 // the same set are AND'ed).
117 + //
118 + // Note that the generated docs which describe the structure of
119 + // this module are wrong because of how this type unmarshals JSON
120 + // in a custom way. The correct structure is:
121 + //
122 + // ```json
123 + // [
124 + // {},
125 + // {}
126 + // ]
127 + // ```
128 + //
129 + // where each of the array elements is a matcher set, i.e. an
130 + // object keyed by matcher name.
131 MatchNot struct {
132 MatcherSetsRaw []caddy.ModuleMap `json:"-" caddy:"namespace=http.matchers"`
133 MatcherSets []MatcherSet `json:"-"`