Forum Discussion
F5-Hopeful
Nimbostratus
Sep 27, 2019Access local variable from a different Virtual Server
Is it possible to move a local variable between Virtual Servers without using a global variable or the session table. I have one tried to transfer it via the session table but as one Virtual Server ...
cjunior
Nacreous
Nov 14, 2019Hello,
Did you try this with sharedvar? https://clouddocs.f5.com/api/irules/sharedvar.html
Example:
# Applied on external layer vs
when HTTP_REQUEST {
sharedvar my_shared_var
set my_shared_var "It was defined at [virtual name]"
log local0. "Running: [virtual name]"
log local0. " ${my_shared_var}"
# Move to internal vs
virtual vs_internal
}
# Applied on internal layer vs
when HTTP_REQUEST {
sharedvar my_shared_var
log local0. "Running: [virtual name]"
if { [info exists my_shared_var] } {
log local0. " ${my_shared_var}"
}
}
Regards.
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