CorsSlim
CorsSlim copied to clipboard
CORS headers not set on exception (SLIM bypasses middleware)
The problem is that SLIM bypasses the middleware that sets the CORS headers in some cases. A quick patch would be to change protected function setCorsHeaders($req, $rsp)
Into public function setCorsHeaders($req, $rsp) {
So this function can be called 'manually' from the (custom) 404, 406 and Errorhandlers.
But maybe it is not a big problem at all. Or maybe there is a better solution.
We use: "palanik/corsslim": "dev-slim3"