Brandon
Feb 03, 2021Cirrostratus
irule to look to see if the value is in the Body
I was trying to figure out how to write an iRule to look for a parameter in the Body. I thought the token would be in the header. However the developer put it in the body. How do I look in the body of a http req.
Thanks for your help.
when HTTP_REQUEST {
if { [HTTP::uri] equals "login.aspx" } {
if { [HTTP::header exists "token"] } {
log local0. "Request from [IP::client_addr] for login.aspx includes HTTP header token with value: [HTTP::header "token"]"
} else {
log local0. "Request from [IP::client_addr] for login.aspx does not include HTTP header token"
}
}
}