APM variable assign examples
Updated Jun 06, 2023
Version 2.0Was this article helpful?
@Stansislas,
Sorry for the late reply, I did solve it like that (not the most effective way but it works):
{session.custom.internaldevice = set current_ip [mcget {session.user.clientip}] ; if { $current_ip starts_with "10.10.10.10" } then { return 2 ; Specific is 2 } elseif {$current_ip starts_with "10.10." } then { return 1 ; INTERNAL is 1 } else { return 0 ; EXTERNAL is 0 };
I need to put the result in a variable, since I need it in a pre-request policy as well.
Thanks for your feedback