caddy/caddyconfig
Matthew Holt 89124aa570
httpcaddyfile: Prevent rewrite routes from consolidating (fix #3108)
It's hard to say whether this was actually a bug, but the linked issue
shows why the old behavior was confusing. Basically, we infer that a
rewrite handler is supposed to act as an internal redirect, which likely
means it will no longer match the matcher(s) it did before the rewrite.

So if the rewrite directive shares a matcher with any adjacent route or
directive, it can be confusing/misleading if we consolidate the rewrite
into the same route as the next handler, which shouldn't (probably) match
after the rewrite is complete.

This is kiiiind of a hacky workaround to a quirky problem.

For edge cases like these, it is probably "cleaner" to just use handle
blocks instead, to group handlers under the same matcher, nginx-style.
2020-03-18 12:18:10 -06:00
..
caddyfile cmd: fmt: Fix brace opening block indentation (#3153) 2020-03-17 09:55:36 -06:00
httpcaddyfile httpcaddyfile: Prevent rewrite routes from consolidating (fix #3108) 2020-03-18 12:18:10 -06:00
json5 caddyconfig: Add JSON5 and JSON-C adapters (closes #2735) 2019-09-02 12:21:41 -06:00
jsonc caddyconfig: Add JSON5 and JSON-C adapters (closes #2735) 2019-09-02 12:21:41 -06:00
configadapters.go admin: /config and /id endpoints 2019-10-09 19:10:00 -06:00