Forum Discussion
ebrc
Nimbostratus
Aug 29, 2019iRule to modify response code for ASM blocking page
Hello everyone, I would love to receive your help to create an irule allowing me to modify the response code (with a 500) of the blocking page of ASM when an illegal request is matched. The go...
gersbah
Cirrostratus
Sep 06, 2019when ASM_REQUEST_BLOCKING {
set blocked 1
set response [ASM::payload]
}
when HTTP_RESPONSE_RELEASE {
catch {
if { $blocked } {
HTTP::respond 500 content $response
}
}
}
Something like this should work. The "catch" to prevent errors for not-blocked requests may be a bit crude. The thing eaa did with setting the indicator for all requests may be better. But this is shorter. I don't know, I'm not a programmer.
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