Skip to content

Issue with Map api path with double slash #744

Answered by Tratcher
npalla asked this question in Q&A
Discussion options

You must be logged in to vote

That value is coming from the client and is not an assembly mistake by the proxy, right?

The fixup is a simple string replace, but deciding when to do it is interesting. From your prior post, it looks like you're using IHttpProxy directly? #736. In that case you'd want to fix the path either before calling ProxyAsync or inside the request transform callback. Here's what a request transform would look like:
https://github.com/microsoft/reverse-proxy/blob/cd117da030ca16d201de9d579e11155ae040d791/samples/ReverseProxy.Direct.Sample/Startup.cs#L64-L72

Here's how the request uri gets built (with some allocation improvements that just got made). You can modify the path while assembling the proxy…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@npalla
Comment options

@npalla
Comment options

@Tratcher
Comment options

@npalla
Comment options

@Tratcher
Comment options

Answer selected by karelz
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