I've setup proxied authentication for RStudio Server.
RStudio Server is redirecting to a middleware implemented using Express JS The middleware creates a request to the authentication server and then parses the response from it.
Then the middleware adds the X-RStudio-Username
header to the response, which is a re-direction to the RStudio. However, the header is added to the response from the middleware, and then the browser doesn't keep it when it redirects to RStudio Server
Since the browser request doesn't have the required header, RStudio requests the authentication again creating an infinite loop
How should I approach this case?
What would be the best way to add the required header for RStudio Server?