ozee31 / cakephp-cors

A CakePHP (3.3+) plugin for activate cors domain in your application
MIT License
43 stars 31 forks source link

exceptionRenderer => false unintended behavior #29

Open PhantomWatson opened 4 years ago

PhantomWatson commented 4 years ago

It's my understanding that the exceptionRenderer => false configuration setting was meant to prevent the plugin from having any effect on exception rendering, but it actually switches your app from any custom exception rendering class to Cake\Error\ExceptionRenderer.

Until this is patched, this change can be prevented by explicitly setting the custom exception renderer class, e.g.

'Cors' => [
    'exceptionRenderer' => 'App\Error\AppExceptionRenderer'
]

or

'Cors' => [
    'exceptionRenderer' => AppExceptionRenderer::class
]