Jinshu
Jul 27, 2016Cirrus
Custom ASM block for HTTP methods
Hi,
I want to block all HTTP methods except GET using ASM. I amk using below irule for blocking and raise ASM violation but somehow irule execution is getting failed while testing with HTTP method POST. I'm unable to find the reason for this failure. Can somebody help please?
when HTTP_REQUEST {
set reqBlock 0
if { ( [HTTP::method] equals "GET" ) } {
return
} else {
set reqBlock 1
}
}
when ASM_REQUEST_DONE {
if { $reqBlock == 1} {
ASM::raise VIOLATION_FORBIDDEN_GET_PATH
}
}