caddy/modules/caddyhttp
Matthew Holt e51e56a494
httpcaddyfile: Fix nested blocks; add handle directive; refactor
The fix that was initially put forth in #2971 was good, but only for
up to one layer of nesting. The real problem was that we forgot to
increment nesting when already inside a block if we saw another open
curly brace that opens another block (dispenser.go L157-158).

The new 'handle' directive allows HTTP Caddyfiles to be designed more
like nginx location blocks if the user prefers. Inside a handle block,
directives are still ordered just like they are outside of them, but
handler blocks at a given level of nesting are mutually exclusive.

This work benefitted from some refactoring and cleanup.
2020-01-16 17:08:52 -07:00
..
caddyauth basicauth: Accept placeholders; move base64 decoding to provision 2020-01-07 08:50:18 -07:00
encode Improve godocs all around 2019-12-23 12:45:35 -07:00
fileserver httpcaddyfile: Group try_files routes together (#2891) 2020-01-16 11:29:20 -07:00
headers A few miscellaneous, minor fixes 2020-01-06 08:10:20 -07:00
httpcache Improve godocs all around 2019-12-23 12:45:35 -07:00
requestbody Improve godocs all around 2019-12-23 12:45:35 -07:00
reverseproxy httpcaddyfile: Fix nested blocks; add handle directive; refactor 2020-01-16 17:08:52 -07:00
rewrite httpcaddyfile: Fix nested blocks; add handle directive; refactor 2020-01-16 17:08:52 -07:00
standard Remove markdown module 2019-12-23 12:55:52 -07:00
starlarkmw http: Change routes to sequential matcher evaluation (#2967) 2020-01-09 10:00:13 -07:00
templates v2: housekeeping: address minor lint complaints (#2957) 2020-01-03 11:33:22 -07:00
autohttps.go httpcaddyfile: Fix nested blocks; add handle directive; refactor 2020-01-16 17:08:52 -07:00
caddyhttp.go http: Refactor automatic HTTPS (fixes #2972) 2020-01-13 16:16:20 -07:00
errors.go http: Change routes to sequential matcher evaluation (#2967) 2020-01-09 10:00:13 -07:00
marshalers.go v2: Logging! (#2831) 2019-10-28 14:39:37 -06:00
matchers_test.go httpcaddyfile: Fix nested blocks; add handle directive; refactor 2020-01-16 17:08:52 -07:00
matchers.go v2: Implement Caddyfile enhancements (breaking changes) (#2960) 2020-01-09 14:00:32 -07:00
replacer_test.go caddyhttp: host labels placeholders endianness from right->left 2019-10-14 12:09:43 -06:00
replacer.go http: Remove {...query_string} placeholder, in favor of {...query} 2020-01-10 17:02:11 -07:00
responsewriter.go http: Always set status code via response recorder 2020-01-08 18:37:41 -07:00
routes.go httpcaddyfile: Fix nested blocks; add handle directive; refactor 2020-01-16 17:08:52 -07:00
server.go http: Refactor automatic HTTPS (fixes #2972) 2020-01-13 16:16:20 -07:00
staticerror.go Export Replacer and use concrete type instead of interface 2019-12-29 13:12:52 -07:00
staticresp_test.go Implement config adapters and beginning of Caddyfile adapter 2019-08-09 12:05:47 -06:00
staticresp.go Export Replacer and use concrete type instead of interface 2019-12-29 13:12:52 -07:00
subroute.go http: Fix subroutes, ensure that next handlers can still be called 2020-01-12 13:39:32 -07:00
vars.go http: Change routes to sequential matcher evaluation (#2967) 2020-01-09 10:00:13 -07:00