Forum Discussion
ebrc
Aug 29, 2019Nimbostratus
iRule 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...
Hi ebrc,
Can you try this iRule?
when HTTP_REQUEST {
set asmstatus "allowed"
}
when ASM_REQUEST_BLOCKING {
set asmstatus "blocked"
}
when HTTP_RESPONSE_RELEASE {
# log local0. "ASM Status: $asmstatus"
if { $asmstatus equals "blocked" } {
HTTP::respond 500 content {
<html>
<head>
<title>Lorem ipsum</title>
</head>
<body>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus non metus mauris.
</body>
</html>
}
}
}
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