-
-
Notifications
You must be signed in to change notification settings - Fork 722
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
path with an extra initial / #738
Comments
I've also hit this. I've found an interesting blog on the topic: https://www.ctrl.blog/entry/relative-double-slashes-url.html Currently, it looks like the only way round this problem is to use a reverse proxy to merge the slashes on warp's behalf. |
Hi! You could try using |
Cheers, @jxs! That's a big help. I'll investigate this workaround. |
@jxs Did you get anywhere with this? @seanmonstar Any chance we could get a new filter behavior to canonicalize multiple slashes? |
When the new `ignore-empty-path-segments` feature is enabled, multiple leading slashes at the start of the path are ignored (the first segment starts after them), and multiple slashes at the end of any matched segment are ignored (so the next segment starts after them). In addition, the `end` filter will ignore multiple slashes that follow the final segment. Both the `fullpath` and `tail` filters will still return any multiple slashes in their matched text, but their `segments` iterator will ignore the empty segments (in fact it does this today even without this feature being set). This change does _not_ include this feature in the list of default features. This change includes path filter testing on paths with multiple slashes in them. This change fixes seanmonstar#738.
I have submitted PR #993 which adds a feature |
I wrote a client with a small bug where it makes a request to a warp server with an extra
/
at the front of the path://api/v1/blah
. My reading of the code suggests that it is currently not possible to make a warp filter that can match this because the path function rejects empty parts and parts with slashes. Is there a way to do this?The text was updated successfully, but these errors were encountered: