Forum Discussion

Thomas_Bigler_3's avatar
Thomas_Bigler_3
Icon for Nimbostratus rankNimbostratus
Sep 06, 2018

http uploads do not redirect to https

We have a webapplication which handles uploads from LAN different than uploads from the internet. Uploads from internet work, internal uploads fail. The webservers are behind a reverse proxy and a F5 - loadbalancer.

 

In both cases (external & internal uploads) the application receives an http request and sends back an http Location Header (the application has no understanding of the SSL Offloading). Although the same load balancer and the same web servers are used for internal and external access, the location header is changed when uploading from the internet (443). This is not the case when uploading from the LAN which causes uploads to fail.

 

Where is this coming from? is this a loadbalancer setting or a reverse proxy issue?

 

Uploads from Internet

 

Uploads from LAN:

 

Any suggestions to solve this?

 

  • Do you have any iRule logic applied? Something that may be adding ":443" to the HTTP Host header?

     

  • Only rule implemented is:

     

    when HTTP_REQUEST { HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri] }

     

  • There's more pieces to this puzzle. Presumably you're using this iRule on an HTTP VIP to redirect traffic to an HTTPS VIP. You're saying "Location Header", so also guessing you mean a redirect.

     

    If that's all correct, then the difference is in how the backend server responds - which redirect URL it sends back to the client. It could be that the :443 in the Internet request, however they're getting there, are informing the application that SSL offload is happening, and that's why it sends back the correct URL.

     

    So a few additional thoughts.

     

    • When the LAN clients get the HTTP redirect URL, do they not go to the HTTP URL and get redirected to HTTPS? Or do they go into a redirect loop and fail?

       

    • Do you have any idea where the :443 is coming from? Could it be coming from the client, or another iRule on the HTTPS VIP?

       

    • You may also want to try enabling the Redirect Rewrite option in the HTTP profile. This setting enables the F5 to rewrite any HTTP URL redirects to HTTPS. Start with the All setting, and if that works, try the Matching setting.