Forum Discussion

Preet_pk's avatar
Preet_pk
Icon for Cirrus rankCirrus
Mar 10, 2022

Disable cookie persistance in irule

Hi,

Just want to know if there is any option to disable cookie persistance in irule for a particular application. As we are using host based Layer 7 irule, there is a requirement to disable cookie persistance for a particular application.

For eg:

ltm rule MAFH_EOC_Ext_iRule {
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
lab1.ae {
pool lab1_Pool1 }
lab2.ae {
pool lab2_Pool1}
}
}
}

Need to disable cookie persistnance only for "lab2.ae"

  • Hello, add "persist none" instruction in lab2.ae switch statement. "persist none" disables persistence (whether enabled via profile or iRule) until the current connection is closed or another persist iRule command is used.

    when HTTP_REQUEST {
      switch [string tolower [HTTP::host]] {
        lab1.ae { pool lab1_Pool1 }
        lab2.ae {
          pool lab2_Pool1
          persist none
        }
      }
    }

     

  • Hello, add "persist none" instruction in lab2.ae switch statement. "persist none" disables persistence (whether enabled via profile or iRule) until the current connection is closed or another persist iRule command is used.

    when HTTP_REQUEST {
      switch [string tolower [HTTP::host]] {
        lab1.ae { pool lab1_Pool1 }
        lab2.ae {
          pool lab2_Pool1
          persist none
        }
      }
    }