Forum Discussion

Annsar_Akhtar's avatar
Annsar_Akhtar
Icon for Nimbostratus rankNimbostratus
Sep 18, 2015

Irule to rediect POST request from HTTP to HTTPS

Hi All

 

I have a query regarding redirecting of POST requests from HTTP to HTTPS, I am trying to see if it possible via an Irule?, I know the default behaviour is to redirect to a GET but I am hoping to preserve the POST and redirect to HTTPS, I have had a read of a few forum articles and cant tell if anyone has any success in this implementation.

 

I currently have an irule which query's for a soapaction header and I then want to force the POST into HTTPS along with a pool redirect, is this possible in any way? I am able to get it working all over HTTP but ideally would want this over HTTPS

 

Thanks

 

4 Replies

  • Hi,

     

    There is no limitation on method after redirect.

     

    If the initial method was a post, the browser will send a post to the redirect url.

     

  • So I should be able to force the POST request with the custom soapaction header to HTTPS? The request is a POST response.

     

    I am struggling to get this working as I can see this being changed to a GET and stripping out the data from the POST.

     

  • Thanks for that, I did have a read of that article after reading something similar on stackoverflow, the 307 performs a temporary redirect with the post response intact.

     

    Thanks again