F5-Geek
Feb 21, 2018Nimbostratus
Irule not working
Below is my irule is not working if the URI::query doesn't have the required parameters. Basically i want send respond 200 for successful connection and 401 for incorrect parameter or non parameter Please suggest
when HTTP_REQUEST { HTTP::header insert "clientless-mode" 1 log local0. "clientless-mode 1" set xyz [HTTP::query]
if {[info exists $abc]} { HTTP::respond 200 content $abc }
}
when ACCESS_POLICY_COMPLETED { if {[ACCESS::policy result] equals "allow"} {set abc [class match -value "$xyz" equals USERS_DG] ACCESS::respond 200 content "$abc" log local0. "$abc"} if{not([class match -value ["$xyz"] equals USERS_dg ] ) } {ACCESS::respond 401 content "TEST"}
}