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

Integrate ITransformProvider with ITransformBuilder.Create Method #2626

Open
PascalSenn opened this issue Oct 9, 2024 · 0 comments
Open

Comments

@PascalSenn
Copy link

PascalSenn commented Oct 9, 2024

Hi there,

I'm currently using YARP to forward requests directly with MapForwarder, as well as through Duende BFF, which uses YARP internally.

I'm implementing a token exchange mechanism and need to intercept the request headers. I believe using the ITransformProvider would be suitable for this task, as it allows appending RequestTransform to the route.

However, I've encountered a problem: both MapForwarder and Duende BFF call the Create method, which does not execute any of the transform providers, as seen in the following code snippet:
TransformBuilder.cs - Lines 139-179.

Currently, it appears that there's no way to apply a generic configuration across all YARP use cases. Overriding ITransformBuilder seems the only way, but the default implementation is internal which doesnt make this easier.

I think adding the ITransformProvider capabilities to the Create method would pretty much solve all of these issues.

What are your thoughts on this approach? Is there anything I might have overlooked?

Thank you!

@PascalSenn PascalSenn changed the title Integrate ITransformFactory with ITransformBuilder.Create Method Integrate ITransformProvider with ITransformBuilder.Create Method Oct 9, 2024
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

1 participant