summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/starlarkmw/internal
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2020-01-15 13:51:12 -0700
committerMatthew Holt <mholt@users.noreply.github.com>2020-01-15 13:51:12 -0700
commita66f461201ae2b7e724b3067f74019bdf44f834e (patch)
treeba0bf0ef6f89dbd5207c87595e22d36b6b304c9d /modules/caddyhttp/starlarkmw/internal
parent07ad4655db5d37635edf36fa91d997d166d306b0 (diff)
caddyfile: Sort site subroutes by key specificity, and make exclusive
In the v1 Caddyfile, only the first matching site definition would be used, so setting these `Terminal: true` ensures that only the first matching one is used in v2, too. We also have to sort by key specificity... Caddy 1 had a special data structure for selecting the most specific site definition, but we don't have that structure in v2, so we need to sort by length (of host and path, separately). For blocks where more than one key is present, we choose the longest host and path (independently, need not be from same key) by which to sort.
Diffstat (limited to 'modules/caddyhttp/starlarkmw/internal')
0 files changed, 0 insertions, 0 deletions