Forum Discussion
hooleylist
Dec 06, 2012Cirrostratus
Hi Jeff,
Can you try this?
when HTTP_REQUEST {
if {[HTTP::password] eq ""}{
HTTP::respond 401 WWW-Authenticate "Basic realm=\"local.loc\""
} else {
binary scan [md5 [HTTP::password]] H* password
if { [class lookup "[HTTP::username]" datagroup_xxx] equals $password } {
log local0. "User [HTTP::username] has been authorized to access virtual server [virtual name]"
Insert iRule-based application code here if necessary
} else {
HTTP::respond 403 content "blocked!"
}
}
}
Aaron