Skip to content
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

AddOnlyPublishedPaths is not compatible with Routing transforms #39

Open
aurelienhayet opened this issue Apr 29, 2024 · 1 comment
Open

Comments

@aurelienhayet
Copy link

aurelienhayet commented Apr 29, 2024

Hi,

In the ReverseProxyDocumentFilter class, at line 151, you search the pathKey (which is the target endpoint one) in the publishedRoutes dictionary (which is created from the routes configuration Path property, in other words the source endpoint):

var pathKey = $"{swagger.PrefixPath}{path.Key}";
if (!publishedRoutes.ContainsKey(pathKey))
{
    continue;
}

Logically, it cannot match.
This leads to unwanted filtering of all transformated paths.

Regards,

Aurélien

@andreytreyt
Copy link
Owner

andreytreyt commented May 2, 2024

@aurelienhayet Hi! Thank you for your issue. You're right. We need to improve our library to interpret YARP transforms. For now, you need to avoid significant path transformations when using AddOnlyPublishedPaths flag. Use "PathPattern": "{**catch-all}" or "PathRemovePrefix": "/proxy-app1". It works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants