Forum Discussion
How do I create a custom HTTP response on ASM default respond call
I have enabled "Trigger ASM iRule Events" in the ASM policy properties.
Now I want to create a iRule that intercepts default response on a ASM blocking response and responds a different HTTP:status in place of the default 200 OK.
Is there anyway I can do that on "ASM_REQUEST_BLOCKING" event via the header replacement.
I want to insert the original HTTP status in place of the default reponse page status
3 Replies
- Vitaliy_Savrans
Nacreous
You can change default responce page and it's status via: Security/Application Security/Blocking /Response Pages/Default Response Page/Custom Response
- Moinul_Rony
Altostratus
Thanks Vitaliy, What I require here is to customize the response of HTTP 200 OK and replace this with the original HTTP response code returned from the server. Such as 403 .. Can we manipulate the default response HTTP 200 OK.. From "request log" I can see each default response have a Response "N/A" .
- Kevin_Stewart
Employee
Actually, Vitaliy is absolutely correct. Under Security - Application Security - Blocking - Response Pages, select "Custom Response" as the Response Type and change the HTTP status code and headers in the Response Headers block. Example:
HTTP/1.1 403 Forbidden Cache-Control: no-cache Pragma: no-cache Connection: closeYou can leave the Response Body section as is, or modify as required.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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