Forum Discussion

Prafulzade_3335's avatar
Prafulzade_3335
Icon for Nimbostratus rankNimbostratus
Sep 18, 2017

irule information

Hi, can you please someone tell me what is the use of following irule.

 

{ when HTTP_REQUEST { if {not([HTTP::header "clientprotocol"] contains "https") } { log local0.info "--Insert header because nothing in clientprotocol = [HTTP::header values clientprotocol]" HTTP::header insert ClientProtocol HTTPS } else { log local0.info "--Header already exist [HTTP::header values clientprotocol]" }

 

} }

 

1 Reply

  • This iRule insert a HTTP header 'clientprotocol' if there isn't already a HTTP header 'clientprotocol' that contains the value 'https'. This iRule seems to be related to an environment where SAP netweaver is being used.

    See: https://www.f5.com/pdf/deployment-guides/f5-sap-dg.pdf

    when HTTP_REQUEST { 
        if {not([HTTP::header "clientprotocol"] contains "https") } {
            log local0.info "--Insert header because nothing in clientprotocol = [HTTP::header values clientprotocol]"
            HTTP::header insert ClientProtocol HTTPS 
        } else {
            log local0.info "--Header already exist [HTTP::header values clientprotocol]"
        }
    }