Forum Discussion
F5-Geek
Nimbostratus
Feb 20, 2018Irule 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
P...
rob_carr
Cirrocumulus
Feb 21, 2018Slightly easier to read formatting:
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"
}
}
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