diff options
author | Matthew Holt <mholt@users.noreply.github.com> | 2020-03-18 12:18:10 -0600 |
---|---|---|
committer | Matthew Holt <mholt@users.noreply.github.com> | 2020-03-18 12:18:10 -0600 |
commit | 89124aa570004c9b565d6a7841aa847b64dee692 (patch) | |
tree | 322cd5f5714698f3c7eaf7d395cbee2f1b95584c /cmd/caddy | |
parent | ab2fc9d066aa4583fad937e841a771eed69907bf (diff) |
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.
Diffstat (limited to 'cmd/caddy')
0 files changed, 0 insertions, 0 deletions