Closed JorisVanEijden closed 4 months ago
Hi @JorisVanEijden
The ProxyUrlReplaceSettings are indeed the correct way to implement your requirements.
See also this unit-test: https://github.com/WireMock-Net/WireMock.Net/blob/master/test/WireMock.Net.Tests/WireMockServer.Proxy.cs#L574
See also these issues and PR's
Describe the bug
ProxyAndRecordSettings.Url = "https://www.example.com/some/sub/paths"
A request for "/someurl" is proxied to "https://www.example.com/someurl"
Expected behavior:
A request for "/someurl" is proxied to "https://www.example.com/some/sub/paths/someurl"
Other related info
The path to proxy to is determined by
var proxyUriWithRequestPathAndQuery = new Uri(proxyUri, requestUri.PathAndQuery);
SincerequestUri.PathAndQuery
will always start with a slash, the created uri will always only take the root of theproxyUri
and ignore the sub paths.*edit: A workaround: