title: yii2 RESTFUL API browser blocked by CORS policy
body: <p>I have a problem, when I use:
  <a href="https://github.com/sirinibin/Yii2-RESTful-API-with-OAuth2?fbclid=IwAR1i5XhcRIov2iT9HPJErVd_FjnYfVoYL5AREOid8QmdDOjmI7K1d-GKMIk" rel="nofollow noreferrer">https://github.com/sirinibin/Yii2-RESTful-API-with-OAuth2?fbclid=IwAR1i5XhcRIov2iT9HPJErVd_FjnYfVoYL5AREOid8QmdDOjmI7K1d-GKMIk</a></p>
  <p>and it works fine, but from browser (fetch from reactNative) I have error:
  <a href="https://i.stack.imgur.com/qNRbS.jpg" rel="nofollow noreferrer">enter image description here</a></p>
  <p>and</p>
  <p><a href="https://i.stack.imgur.com/6Q27k.jpg" rel="nofollow noreferrer">enter image description here</a></p>
  <p>how can I add OPTIONS to all my requests?</p>
  <p>thanks</p>