404 error on OPTIONS request


(Leonardo Burchi) #1

Hi all,

I have an application created by the advanced template, with frontend, backend and console applications.

Now I would like to add rest API to the application and under frontend/controller folder I created a new folder called api where I stored some new controllers that inherits from yii\rest\Controller.

All works fine except when the client make the preflight check with OPTIONS request to the controller and it returns always a 404 error.

Could you help me to understand what’s missing in your opinion?

How Yii manage those options requests?

Thank you!!