ozee31 / cakephp-cors

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

options 404 #10

Closed nomanbiniqbal closed 6 years ago

nomanbiniqbal commented 7 years ago

After i implement this plugin and send options call it modified the response header but returning 404 not found error . please help.

nomanbiniqbal commented 7 years ago

i m using this to genrate resource https://book.cakephp.org/3.0/en/development/routing.html#mapping-additional-resource-routes

ozee31 commented 7 years ago

i look at that ASAP

frankvanhest commented 6 years ago

Sorry to say that this fix will now break applications which do not use the RoutingMiddleware. The following exception is thrown. [LogicException] No middleware matching 'Cake\Routing\Middleware\RoutingMiddleware' could be found. I've added a PR with a possible solution for this. Unfortunately there is no method available in the CakePHP MiddlewareQueue to check if a middleware is used, so my given solution smells a bit hacky. See PR https://github.com/ozee31/cakephp-cors/pull/17

ozee31 commented 6 years ago

Good job, it's merged, i create new release