Forum Discussion
Chandru_01
Nimbostratus
Dec 09, 2018Variable assignment in irule
Dear All,
I need to set an irule variable in the HTTP_RESPONSE based on a condition, and make a decision on the next HTTP_REQUEST based on the variable value and unset the variable.
The pr...
Faruk_AYDIN
Altostratus
Dec 09, 2018Hi Guy,
use a custom session variable in your iRule like the following:when HTTP_REQUEST {
if { [ACCESS::session data get session.custom.var] eq "1" }{
do something
ACCESS::session data set session.custom.var ""
}
}
when HTTP_RESPONSE {
if { [HTTP::status] contains 302 and [HTTP::header "Location" ] eq "/vdesk/hangup.php3" }
{
ACCESS::session data set session.custom.var "1"
}
}
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