ozee31 / cakephp-cors

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

Failing preflight requests #26

Open rchavik opened 4 years ago

rchavik commented 4 years ago

I'm experiencing some problem due to actions being executed in preflight requests.

Currently, I workaround this by adding the following in my AppController:

    public function beforeFilter(\Cake\Event\EventInterface $event)
    {
        if ($this->request->is('options')) {
            $event->setResult($this->response);
            return $this->response;
        }
    }

Are we missing something?

raph1mm commented 3 years ago

@ozee31 Any news about this?