You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using NelmioCorsBundle in an API and if an exception is sent, Symfony does not trigger the kernel.response event but the kernel.exception one.
So the Access-Control-Allow-Origin is not set. It's a little bit annoying as if the http client send a wrong request, the request will blocked by the CORS instead of returning the reason.
Shouldn't we add $this->dispatcher->addListener('kernel.exception', array($this, 'onKernelResponse'), 0);?
The text was updated successfully, but these errors were encountered:
I cannot reproduce this somehow, kernel.response still fires for me after kernel.exception is used to generate a response.. Can anyone still repro this?
Hello,
We are using NelmioCorsBundle in an API and if an exception is sent, Symfony does not trigger the
kernel.response
event but thekernel.exception
one.So the Access-Control-Allow-Origin is not set. It's a little bit annoying as if the http client send a wrong request, the request will blocked by the CORS instead of returning the reason.
Shouldn't we add
$this->dispatcher->addListener('kernel.exception', array($this, 'onKernelResponse'), 0);
?The text was updated successfully, but these errors were encountered: