Forum Discussion

sims2009_290343's avatar
sims2009_290343
Icon for Nimbostratus rankNimbostratus
May 09, 2017

setting cookie size

Hi, How can I set cookie size value in f5 for example ,if the size exceed more than 2Kb do not process it Thanks

 

  • JG's avatar
    JG
    Icon for Cumulonimbus rankCumulonimbus

    You can try this irule, which removes the cookie header if its total length exceeds 2K:

    when HTTP_REQUEST {
        if { [HTTP::header exists Cookie] } {
            if { [string length [HTTP::header Cookie]] > 2048 } {
                HTTP::header remove Cookie
            }
        }
    }