ozee31 / cakephp-cors

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

'Access-Control-Expose-Headers' should be after the OPTIONS request #19

Closed wschwarte closed 5 years ago

wschwarte commented 5 years ago

So my custom headers were not exposed correctly. Moving the expose headers to after the preflght options request seems to fix this.

Your code should move this outside the if (strtoupper($request->getMethod()) === 'OPTIONS') { }

then it works correctly.

ozee31 commented 5 years ago

Fixed in https://github.com/ozee31/cakephp-cors/releases/tag/v.1.1.5