Forum Discussion
variable in different event of Irule
- 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
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
HTTP headers are available in ACCESS_SESSION_STARTED event... no need to work in multiple events.
Recent Discussions
Related Content
* 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