For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

henrykay_123_28's avatar
henrykay_123_28
Icon for Nimbostratus rankNimbostratus
Oct 04, 2016

intercept response and modify http:// to https://

hi guys,

i am currently implementing SAP with F5, however we ran into 1 issue. The SAP is configured to only support http so SSL offload was done on F5. i have 2 VS. one 443 and 1 80

the issue we run into is that a couple of the functionalities in SAP does a POST action to the http://url during the post, certain information such as emp_id are sent together. but however when the traffic hits the port 80 VS, the information went missing and the requested POST action can't be completed.

i have tried the following to change the http to https in the response but seems like it is still hitting the port 80 vs

when HTTP_REQUEST {
STREAM::disable
}
when HTTP_RESPONSE {
        STREAM::expression "@http://@https@://"
        STREAM::enable 

}

seems like even if i dont put any condition, it hits the response irule but after that it still goes to the port 80 VS

Would anyone be able to point me to the right direction or information to resolve this?

4 Replies

  • THi's avatar
    THi
    Icon for Nimbostratus rankNimbostratus

    Is the stream expression as you stated above? The third delimiting @-sign should be in the end. Now you are replacing " with "https".

    Instead of:

    STREAM::expression "@http://@https@://"

    Try:

    STREAM::expression "@http://@https://@"

  • hi henrykay, you can try irule shown below;

    when HTTP_REQUEST {

    HTTP::header remove Accept-Encoding
    STREAM::disable
    

    }

    when HTTP_RESPONSE {

    if { [HTTP::header exists Location] } {
    
        HTTP::header replace Location [string map {"http://" "https://"} [HTTP::header Location]]
    }
    if { [HTTP::header Content-Type] contains "text" } {
        STREAM::expression {@http://@https://@}
        STREAM::enable
    }
    

    }

  • oops. thats a typo on my portion. what i entered is the one that you have suggested.