Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allowed values for Path Prefix Rewrite #3593

Open
LiorLieberman opened this issue Feb 4, 2025 · 0 comments
Open

Allowed values for Path Prefix Rewrite #3593

LiorLieberman opened this issue Feb 4, 2025 · 0 comments

Comments

@LiorLieberman
Copy link
Member

LiorLieberman commented Feb 4, 2025

Currently we don't validate values in ReplacePathPrefix.

Users can have the following config:

...
    matches:
    - path:
        type: PathPrefix
        value: /foo
    filters:
        - type: URLRewrite
          urlRewrite:
            path:
              replacePrefixMatch: bar (NOTE the absence of a leading "/")
              type: ReplacePrefixMatch

This will essentially screw the request, (tested with istio, i got 400).

The question is what are our expectations around it and whether we should add CEL to the spec to disallow it.

Technically, for a URI, it is possible to have something like one.exmaple.com#<some-fragment> or one.exmaple.com?<query-params> without a "/" in between, but AFAICT, most browsers normalize that and add a "/" in between, AND, more importantly, this feature is path rewrite and not a rewrite for other parts of the URI.

Thoughts?

/cc @mikemorris @arkodg @robscott @howardjohn @kflynn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant