Forum Discussion
navgup_66025
Nimbostratus
Jul 22, 2013Env variable or session variable
declare global var =0
when HTTP_REQUEST {
if var = 0 {
if { [HTTP::header value Authorization] contains "Negotiate YII" } {
var = 1
pool Kerberos_Pool
} else {
var = 2
pool Forms_Pool
}
}
}
Is there a way to declare a global session var that does not reset until the session is closed?
There are many REQUESTS that goes in a client initial logon authorization session.
However, since there are many REQUESTs in the same session, the browser jumps from kerberos pool to forms pool (back and forth) because form pool sometimes return null. Is there a way to set a global variable in irule that keep a count for a number of a request went through? For eg, how many times [HTTP::header value Authorization] contains "Negotiate YII" HTTP REQUEST went through?
1 Reply
- Kevin_Stewart
Employee
Unfortunately, global variables are actually global to the box. In your case I'd try setting the initial "var" variable in the CLIENT_ACCEPTED event. Local variables essentially last for the span of a TCP session, so setting it here makes it available to all other events within that TCP session.
Alternatively, if you need the value to span multiple TCP sessions, you may need to explore setting the value in the session table.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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