Forum Discussion

BLacaze's avatar
BLacaze
Icon for Altostratus rankAltostratus
Jul 01, 2020

How to access an LTM Policy variable from an iRule ?

Hello, I'm trying to set a variable in an LTM Policy like this:     But then: how can I access this variable from an iRule ?   The only information I find on support site/devcentral is: "...
  • Simon_Blakely's avatar
    Jul 01, 2020

    First, the assignment needs to be [HTTP::method]

    Your irule just needs to reference the connection variable that you assigned in the policy

    when HTTP_REQUEST {
      log local0. "$policy_http_method"
    }