Forum Discussion
spiv
Apr 28, 2020Altocumulus
Print string found in Data Group to Log
I have an iRule that is looking in the HTTP POST request method data payload for a string that is defined in a data-group. I would like to print to the log whichever string from the referenced data-...
PeteWhite
Employee
when HTTP_REQUEST_DATA {
set payload [HTTP::payload]
set value [class match -value [string tolower $payload] contains "restricted_dg"]
if {$value != ""} {
# set variable named restricted_text to the string found in $payload
# that matches something in data-group restricted_dg
log local0. "Rejecting restricted content $restricted_text :$value"
reject
}
}
spiv
Apr 28, 2020Altocumulus
Thanks for your reply Pete.
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