"Return" path in a node

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?

Hi @triblondon - Welcome to forums!

A node can only ever have 1 input.

But… there are 2 ways to accomplish this.

  1. Using a link-call node setup, so different parts of the flow call the same auth operation block.

  2. using a combination of switch nodes and message tagging, and direct traffic based on the current tag value, you can swing back around the auth operation and it will output to a different pin on switch nodes, based on the current tag, the topic property will can be used for this

Link call nodes, sounds like a perfect fit, if I understand your requirements

Yes. Not so much a 'hope' rather an 'expect'. If any do lose the response data there are ways to work around that, after submitting an issue against the node.

Thank you both, much appreciated!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.