Clarify path prefix rewrite / redirect docs for HTTPPathModifier #2078
Labels
kind/bug
Categorizes issue or PR as related to a bug.
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
What happened:
The ReplacePrefixMatch docstring is a bit confusing since it doesn't provide a value for
ReplacePrefixMatch
in the example:ReplacePrefixMatch specifies the value with which to replace the prefix match of a request during a rewrite or redirect. For example, a request to "/foo/bar" with a prefix match of "/foo" would be modified to "/bar".
What you expected to happen:
The intro sentence should have the replacement prefix in the example:
For example, a request to "/foo/bar" with a prefix match of "/foo" and a replace prefix of "/xyz" would be modified to "/xyz/bar"
Clarifying trailing slash behavior would ideally be incorporate into a table of incoming request, prefix match value, replace prefix and output, eg:
While making the above table, I noticed that empty string in
ReplacePrefixMatch
can be problematic since it will have inconsistent behavior when the request path is identical to the prefix match.The text was updated successfully, but these errors were encountered: