Forum Discussion

Jumbo's avatar
Jumbo
Icon for Altostratus rankAltostratus
Apr 04, 2021

TCL error with an universal irule

I implement a VS that use an Irule to do persistence based on XFF information, but I got a TCL error when the server response to the client It seems it happened only when the client is an Microfocu...
  • spalande's avatar
    Apr 04, 2021

    Is there a reason you are adding persistence in the http response event?

    ​I think since you want to create persistence from the client side information (XFF/src address) adding it in the http request event would be enough.

    when HTTP_REQUEST { 
     if {[HTTP::header X-Forwarded-For] != ""} then {
    persist uie [lindex [ split [lindex [HTTP::header values X-Forwarded-For] 0] "," ] 0]
        } else {
    persist uie [IP::client_addr]
    }
    }