caddy/caddyconfig/httpcaddyfile
Gilbert Gilb's b0d5c2c8ae
headers: Support default header values in Caddyfile with '?' (#3807)
* implement default values for header directive

closes #3804

* remove `set_default` header op and rely on "require" handler instead

This has the following advantages over the previous attempt:

- It does not introduce a new operation for headers, but rather nicely
  extends over an existing feature in the header handler.
- It removes the need to specify the header as "deferred" because it is
  already implicitely deferred by the use of the require handler. This
  should be less confusing to the user.

* add integration test for header directive in caddyfile

* bubble up errors when parsing caddyfile header directive

* don't export unnecessarily and don't canonicalize headers unnecessarily

* fix response headers not passed in blocks

* caddyfile: fix clash when using default header in block

Each header is now set in a separate handler so that it doesn't clash
with other headers set/added/deleted in the same block.

* caddyhttp: New idle_timeout default of 5m

* reverseproxy: fix random hangs on http/2 requests with server push (#3875)

see https://github.com/golang/go/issues/42534

* Refactor and cleanup with improvements

* More specific link

Co-authored-by: Matthew Holt <mholt@users.noreply.github.com>
Co-authored-by: Денис Телюх <telyukh.denis@gmail.com>
2020-11-20 12:38:16 -07:00
..
addresses.go httpcaddyfile: Don't lowercase placeholder contents (fixes #3264) 2020-04-14 16:11:46 -06:00
addresses_fuzz.go ci: fuzz: switch engine from libfuzzer to native go-fuzz (#3194) 2020-03-26 18:20:34 -06:00
addresses_test.go httpcaddyfile: Don't lowercase placeholder contents (fixes #3264) 2020-04-14 16:11:46 -06:00
builtins.go caddytls: Support multiple issuers (#3862) 2020-11-16 11:05:55 -07:00
builtins_test.go httpcaddyfile: Be stricter about log syntax (#3419) 2020-05-15 15:57:16 -06:00
directives.go headers: Support default header values in Caddyfile with '?' (#3807) 2020-11-20 12:38:16 -07:00
directives_test.go tests: Clean up redundant type declarations 2020-04-10 08:48:21 -06:00
httptype.go httpcaddyfile: Add certificate_pem placeholder short, add to godoc (#3846) 2020-11-04 13:37:41 -05:00
httptype_test.go httpcaddyfile: Bring enforce_origin and origins to admin config (#3595) 2020-08-03 13:44:38 -06:00
options.go caddytls: Add support for ZeroSSL; add Caddyfile support for issuers (#3633) 2020-08-11 08:58:06 -06:00
tlsapp.go caddytls: Support multiple issuers (#3862) 2020-11-16 11:05:55 -07:00
tlsapp_test.go httpcaddyfile: Revise automation policy generation (#3824) 2020-10-28 20:36:00 -06:00