-
Hello, I'm trying to configure the reverse proxy so that when a client makes a call to my server, the reverse proxy internally starts a sequence of two calls. My scenario is that if the first call returns some specific information (typically a faulty state), then the sequence stops there and returns an error response to the client. If the first call returns a good state, then the second call is made, and its result is returned to the client. I have succeeded in making this by injecting a middleware of my own which manually makes the call to my first service and checks for the returned state before setting an error response or continuing the pipeline to the next middleware, but this involves a mix of concerns that I try to get rid of. My question then is: Is there a way of configuring a sequence of routes directly within reverse proxy? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
No, nothing like that is built-in, but using a custom middleware before forwarding is a perfectly good solution in this case. |
Beta Was this translation helpful? Give feedback.
No, nothing like that is built-in, but using a custom middleware before forwarding is a perfectly good solution in this case.