Redirecting based on a condition #1937
-
Hey, just curious if I am missing something obvious. I am attempting run custom validation in a middleware, and then if certain conditions are met to redirect to a different destination than requested. Essentially what I am trying to do is perform a response redirect, so that the user is directed to a different location. What is the way to do this correctly with YARP? Am I forced to use Direct Forwarding? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
There's a |
Beta Was this translation helpful? Give feedback.
There's a
context.ReassignProxyRequest(cluster)
API you can use to change the destination in a middleware.See https://microsoft.github.io/reverse-proxy/articles/ab-testing.html