Forum Discussion
abhinay
Nimbostratus
Dec 27, 2022iRule for HTTP Post Method to match form data in the body
Please let me know how to match formdata "key" and "value" using HTTP Method "POST" from its Body. From below I would like to match key "func" its value that contains "qds." "body": {
"mod...
abhinay
Nimbostratus
Dec 27, 2022I am trying the below after collecting the payload but it is not working. For form-data do we have to use something else to match? FYI the below works for form-urlencoded?
when HTTP_REQUEST_DATA {
if { [HTTP::method] equals "POST" }{
set http_request_body "?[HTTP::payload]"
if { [URI::query $http_request_body func] contains "qds." } {
HTTP::respond 403 content "Forbidden" "Content-Type" "text/html"
} }
}
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
