Skip to content

Need to match a malformed URL generated by a client app #1997

Answered by MihaZupan
bmatatuk asked this question in Q&A
Discussion options

You must be logged in to vote

Is there any way I can match both of these variants (single or double slashes) in the path

The configuration you are using ("/api/{**catch-all}") will already match both /api/foo and /api//bar.

YARP will forward these requests as-is. That is, the backend destination will also see /api/foo and /api//bar.
Are you looking to configure YARP such that it accepts both, but forwards them on in a normalized format (/api/foo and /api/bar)?

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@bmatatuk
Comment options

@MihaZupan
Comment options

@bmatatuk
Comment options

Answer selected by bmatatuk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants