Forum Discussion
svs
Sep 28, 2016Cirrus
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