caddy/modules/caddyhttp
Matt Holt 7527c01705
v2: Implement Caddyfile enhancements (breaking changes) (#2960)
* http: path matcher: exact match by default; substring matches (#2959)

This is a breaking change.

* caddyfile: Change "matcher" directive to "@matcher" syntax (#2959)

* cmd: Assume caddyfile adapter for config files named Caddyfile

* Sub-sort handlers by path matcher length (#2959)

Caddyfile-generated subroutes have handlers, which are sorted first by
directive order (this is unchanged), but within directives we now sort
by specificity of path matcher in descending order (longest path first,
assuming that longest path is most specific).

This only applies if there is only one matcher set, and the path
matcher in that set has only one path in it. Path matchers with two or
more paths are not sorted like this; and routes with more than one
matcher set are not sorted like this either, since specificity is
difficult or impossible to infer correctly.

This is a special case, but definitely a very common one, as a lot of
routing decisions are based on paths.

* caddyfile: New 'route' directive for appearance-order handling (#2959)

* caddyfile: Make rewrite directives mutually exclusive (#2959)

This applies only to rewrites in the top-level subroute created by the
HTTP caddyfile.
2020-01-09 14:00:32 -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 http: Change routes to sequential matcher evaluation (#2967) 2020-01-09 10:00:13 -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 http: Change routes to sequential matcher evaluation (#2967) 2020-01-09 10:00:13 -07:00
rewrite http: Change routes to sequential matcher evaluation (#2967) 2020-01-09 10:00:13 -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
caddyhttp.go http: Change routes to sequential matcher evaluation (#2967) 2020-01-09 10:00:13 -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.go v2: Implement Caddyfile enhancements (breaking changes) (#2960) 2020-01-09 14:00:32 -07:00
matchers_test.go v2: Implement Caddyfile enhancements (breaking changes) (#2960) 2020-01-09 14:00:32 -07:00
replacer.go Export Replacer and use concrete type instead of interface 2019-12-29 13:12:52 -07:00
replacer_test.go caddyhttp: host labels placeholders endianness from right->left 2019-10-14 12:09:43 -06:00
responsewriter.go http: Always set status code via response recorder 2020-01-08 18:37:41 -07:00
routes.go http: Change routes to sequential matcher evaluation (#2967) 2020-01-09 10:00:13 -07:00
server.go http: Change routes to sequential matcher evaluation (#2967) 2020-01-09 10:00:13 -07:00
staticerror.go Export Replacer and use concrete type instead of interface 2019-12-29 13:12:52 -07:00
staticresp.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
subroute.go http: Change routes to sequential matcher evaluation (#2967) 2020-01-09 10:00:13 -07:00
vars.go http: Change routes to sequential matcher evaluation (#2967) 2020-01-09 10:00:13 -07:00