Forum Discussion
Blocked Response in JSON Fformat
Hi,
The ASM Blocked response page is in HTML format which contains the Support ID. Even we enabled the AJAX response it is also in simple HTML format.
I need the Blocked response from ASM in JSON format.
Best Wishes,
2 Replies
- svs
Cirrostratus
Hi MSZ,
if you need the blocking response from the ASM in JSON format, just modify the default response message. You can just send JSON instead on HTML content.
I.e.
[{"status":"error","data":{"message":"This request was rejected due to a violation. Please contact webmaster@example.com, and provide this reference ID: <%TS.request.ID()%>"}}]Please make sure, that you change the Content-Type Header as well.
If you cannot set the JSON response for the whole Security Policy, but for single URIs or if the request is of type "application/json", you need to create an iRule, which sends the response instead of the policy itself.
Hope this helps.
Greets, svs
- MSZ
Nimbostratus
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