Forum Discussion

Preet_pk's avatar
Preet_pk
Icon for Cirrus rankCirrus
Oct 12, 2023

Removing header "Connection:keep-alive" for an application in F5

Hi All,

Below is eg ofhostname publishing setup in dev F5. Please share the irule syntax to removing header "Connection:keep-alive" for "labred.local.ae"

LAB-INTERNAL-iRule
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
labred.local.ae {
pool Lab-red-pool }
labblue.local.ae {
pool Lab-blue-pool }
}

  • Preet_pk I believe the following is what you're looking for.

    when HTTP_REQUEST priority 500 {
    
        switch -- [string tolower [HTTP::host]] {
            labred.local.ae {
                HTTP::header remove Connection
                pool Lab-red-pool
            }
            labblue.local.ae {
                HTTP::header remove Connection
                pool Lab-blue-pool
            }
    
    }