caddy/caddyconfig/caddyfile
Matthew Holt e51e56a494
httpcaddyfile: Fix nested blocks; add handle directive; refactor
The fix that was initially put forth in  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
..
testdata Implement config adapters and beginning of Caddyfile adapter 2019-08-09 12:05:47 -06:00
adapter.go caddyfile: Preprocess env vars in {$THIS} format () 2020-01-09 09:40:16 -07:00
dispenser.go httpcaddyfile: Fix nested blocks; add handle directive; refactor 2020-01-16 17:08:52 -07:00
dispenser_test.go caddyfile: fix replacing variables on imported files () 2020-01-09 19:34:22 -07:00
lexer.go v2: Make tests work on Windows () 2019-10-15 16:05:53 -06:00
lexer_test.go v2: Make tests work on Windows () 2019-10-15 16:05:53 -06:00
parse.go caddyfile: fix replacing variables on imported files () 2020-01-09 19:34:22 -07:00
parse_fuzz.go Add missing fuzzer () 2019-10-30 23:57:22 +03:00
parse_test.go caddyfile: fix replacing variables on imported files () 2020-01-09 19:34:22 -07:00