caddy/caddytest
Jay Hemnani 0584875297
headers: evaluate conditional defaults independently (#8217)
* headers: Check each ? default on its own and keep the response matcher

Several ? defaults in one header block shared one require, so a single
field already set on the response blocked all of them. A match in the
block was also dropped for the ? fields, so they were set on every
response.

* headers: Reject a response matcher on a field that also has a ? default

A ? default already requires its field to be absent, so a match on the
same field in that block could only be dropped or never be true. It is
now a Caddyfile error.

* headers: Test that the last ? default for a field wins

* headers: Allow an absence matcher on a field with a ? default

`match header !X-Test` asks for what `?X-Test` already requires, so it
loads again. Only a matcher that needs a value on that field is an error.
2026-10-16 22:32:44 +10:00
..
integration headers: evaluate conditional defaults independently (#8217) 2026-10-16 22:32:44 +10:00
a.caddy.localhost.crt caddyhttp: Add default SNI tests (#3146) 2020-03-17 12:39:01 -06:00
a.caddy.localhost.key caddyhttp: Add default SNI tests (#3146) 2020-03-17 12:39:01 -06:00
caddy.ca.cer httpcaddyfile: Add client_auth options to tls directive (#3335) 2020-06-05 12:19:36 -06:00
caddy.localhost.crt caddyhttp: Fix default SNI for default conn policy (#3141) 2020-03-13 11:32:53 -06:00
caddy.localhost.key caddyhttp: Fix default SNI for default conn policy (#3141) 2020-03-13 11:32:53 -06:00
caddytest.go chore: fix lint errors from newer golangci-lint (#7958) 2026-08-25 13:12:10 +10:00
caddytest_test.go core: Check whether @id is unique (#7002) 2026-03-03 15:09:49 -07:00
leafcert.pem caddytls: clientauth: leaf verifier: make trusted leaf certs source pluggable (#6050) 2024-03-05 14:55:37 -07:00