spatie / laravel-cors

Send CORS headers in a Laravel application
https://spatie.be/en/opensource/laravel
MIT License
603 stars 59 forks source link

Fix: return empty response for 204 preflight requests #61

Closed vdbelt closed 5 years ago

vdbelt commented 5 years ago

As mentioned in https://github.com/spatie/laravel-cors/issues/60, it appears that returning a 204 No Content response with content indeed causes odd behaviour in some clients. This PR fixes that by removing the 'Preflight OK' text, so it follows the specs.

Related info: https://github.com/httpwg/http-core/issues/26 https://github.com/postmanlabs/postman-app-support/issues/2418

freekmurze commented 5 years ago

Thanks!