Forum Discussion
vinodu
Nimbostratus
Jul 11, 2019variable in different event of Irule
I'm working on an irule i'm trying to save the XFF Header data to a variable in the Irule Event HTTP_REQUEST and use the same variable in Irule Event ACCESS_POLICY_AGENT_EVENT But i'm getting an erro...
- Jul 11, 2019
Hi
Have you tried storing the xxf header as an APM variable right at the start when then policy first fires....?
when HTTP_REQUEST { if {[HTTP::header exists X-Forwarded-For]}{ set xff [HTTP::header values X-Forwarded-For] } } when ACCESS_SESSION_STARTED { if {[info exists xff]}{ ACCESS::session data set session.custom.xff $xff } }
If the value is saved as an APM variable then you should be able to manipulate it (or take action if it is empty) further on in the APM policy
Stanislas_Piro2
Cumulonimbus
Jul 11, 2019It seems that ACCESS_POLICY_AGENT_EVENT is not linked to connection but to access policy evaluation in an asynchronous context... it doesn't have access to connection variables...
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects