My Loadbalancer holds ssl certificate so all requests to my site are http. How can I deal with situations where I need to redirect? [closed]

StackOverflow https://stackoverflow.com/questions/19322349

  •  30-06-2022
  •  | 
  •  

Question

I have a .Net C# WebApplication which is hosted on a server and accessed behind a loadbalancer.

In order to keep costs down, we have one SSL certificate on the F5 loadbalancer and when it sends the request to our application, the Url changes from https:// website.com/path to http:// website.com:8080/path.

This is fine under most circumstances, however, we are starting to include 3rd party plugins and tools that like to redirect based on certain criteria. By default, when you redirect, users will try to use the Request object to help rewrite the new Url. Because our site receives an HTTP Url, the response tells the user to redirect to http:// website.com:8080/newpath and this url doesn't exist.

Has anybody encountered this problem and what solutions had you come up with?

We are using an F5 Loadbalancer hosted and managed by Rackspace. Also for UAT, although not ideal, we are using the ARR Loadbalancer. Whatever we do on the F5, we have to be able to simulate in the ARR.

My last resort thought was to add a filter to the HttpResponse object so that before it is sent out, I can change any mentions of the bad Url. Both in the header and the body.

Was it helpful?

Solution

Your F5 appliance should have a rule for rewriting URLs in the response to HTTPS, including redirects.

I'd tell you where it is, but my experience is limited to Citrix Netscalers.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top