I'm trying to make a set of nodes for working with an HTTP proxy, allowing the proxy to be configured to perform various operations on requests that come through it all in a low-code way. My question is, can I have a node that operates on the outbound AND return path of the request, with other nodes in between?
Imagine I have an "authentication" node that verifies the client's identity on the request, and then also sets a cookie on the response.
HTTP in -> Auth -> Backend fetch -> Auth (again) -> HTTP response
Is it possible for a flow to pass through the same node twice? I guess by having a node with two inputs and two outputs?
Or should I do this with multiple nodes - a request phase and response phase?
How would you co-ordinate / maintain state between the request and response phase? Would you do that by carrying state in the message and hoping it is not wiped out by any nodes that process the message in between?