Using Route Transforms Outside of Services Builder #1939
Answered
by
Tratcher
jongallant
asked this question in
Q&A
-
Is there no way to use YARP transforms from the request pipeline itself? Must all transforms be applied at the service builder phase? I have a requirement where I must insert a header value in a request middleware. Must I inject it directly into the HttpContext object in this case? Or can it be done with YARP transforms? |
Beta Was this translation helpful? Give feedback.
Answered by
Tratcher
Nov 28, 2022
Replies: 1 comment 2 replies
-
Middleware can modify the HttpContext as needed, though we recommend transforms as a cleaner option to avoid issues on retry, etc. What else is the middleware doing that can't be done in a transform? |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
jongallant
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Middleware can modify the HttpContext as needed, though we recommend transforms as a cleaner option to avoid issues on retry, etc.
What else is the middleware doing that can't be done in a transform?