F5 is upgrading its customer support chat feature on My.F5.com. Chat support will be unavailable from 6am-10am PST on 1/20/26. Refer to K000159584 for details.

Forum Discussion

Igor430's avatar
Igor430
Icon for Altostratus rankAltostratus
Feb 09, 2022
Solved

Assign cookie value to APM custom variable

Hey all, Looking for help to create an irule that would check for the XSRF-TOKEN cookie in the HTTP request and if it exists, assign the cookie value to a custom APM variable (for example, session.c...
  • Pedro_Roure's avatar
    Feb 09, 2022

    I believe that something like this should work: 

    when ACCESS_ACL_ALLOWED {

    if { [HTTP::cookie exists "XSRF-TOKEN"] } {

    ACCESS::session data set session.custom.xsrftoken [HTTP::cookie value XSRF-TOKEN]

    }

    }