Option to Disable "Follow Redirect" in HTTP Node Requests

I would like to suggest adding a configuration to disable automatic redirection in HTTP Node requests. Some libraries, such as axios (with maxRedirects=0), requests (with followRedirect=false), and fetch (with redirect=manual), offer this functionality, allowing for finer control over HTTP redirects, which are enabled by default.

Motivation and Use Case:

I am integrating with AWS Cognito, which does not allow direct SAML integration for SSO. Instead, the integration must be done using the OAuth2 standard. To achieve this, I intended to use the /oauth2/authorize endpoint to perform a flow similar to the SAML: Login URL Node block, where the redirection URL is returned from the authentication server (workflow).

However, Cognito returns a redirect (HTTP 301 status code) in the response. As a result, the HTTP Node automatically follows the redirect and returns the HTML page instead of just capturing the Location header, which contains the Identity Provider’s Login URL.

If it were possible to disable the automatic redirection, I would be able to retrieve the Identity Provider Login URL directly from the Location header, instead of receiving the HTML page. This would simplify processing this response in the workflow.

Expected Benefits:

Increased flexibility for the use cases, where the redirection URL needs to be validated before proceeding, offering control over the redirect behavior of HTTP requests in the backend (workflow)

Thanks for the request, the use case, and the well-reasoned arguments. I will file this ticket and update you if/when it is implemented.

1 Like