https://odan.github.io/2019/11/24/slim4-cors
Please write your comments / suggestions / feedback here 👇
https://odan.github.io/2019/11/24/slim4-cors
Please write your comments / suggestions / feedback here 👇
One thing about preflight requests is: when the preflight request is causing error, check if Authorization Middleware is authenticating OPTIONS routes.
If OPTION route is authenticated, causes on non 2xx requests, making the browser abort the request.
I spent a lot of time trying to get CORS working with the Slim 4 skeleton app until I discovered the ResponseEmitter class which just lets you add your origin host and takes care of the rest. FYI for anyone else in this situation.