microsoft / dev-proxy

Dev Proxy is an API simulator that helps you effortlessly test your app beyond the happy path.
https://aka.ms/devproxy
MIT License
508 stars 59 forks source link

Bug: In ApiCenterOnboardingPlugin, incorrectly matching APIs served not from the root #728

Closed waldekmastykarz closed 5 months ago

waldekmastykarz commented 5 months ago

In the ApiCenterOnboardingPlugin, when finding matching paths, we assume, that the API is served from the root. That's obviously incorrect and leads to the plugin being unable to match paths when APIs are served from a path (eg. server URL https://api.contoso.com/v1.0). We need to update the logic, so that before we compare the path from the request with the path from the spec, we check if the request URL contains any path and remove it.