Support X-Alertify-Trigger custom header to force the alert trigger on kernel.response
Custom header
If you want to force the trigger of an alert, after an ajax call for example, you need to send through the response a custom header : X-Inject-Alertify
. When its value is set to true
, then the alert append at the end of the response content, even if it is empty. Note that the 204
status code (No content) is incompatible with this header, as the 204 response MUST NOT include a message-body.
Example :
return new Response(null, 200, [
'X-Inject-Alertify' => true
]);