spatie / laravel-cors

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

Added Access-Control-Allow-Credentials Support to the package #31

Closed mxaddict closed 6 years ago

mxaddict commented 6 years ago

Added Access-Control-Allow-Credentials Support to the package

We needed this for one of our laravel API projects.

freekmurze commented 6 years ago

Thanks!

hxnk commented 6 years ago

@freekmurze I believe this is a breaking change, because when the ServiceProvider tries to merge the default config with the one published in the project, only top-level keys (in this case 'cors_profile' and 'default_profile' are merged).

This means config('cors.default_profile.allow_credentials') will return null when the config file was published before this merge, and stuff blows up...

freekmurze commented 6 years ago

Damn, I’m at a conference now, so not too much time to work on this now, I’d appreciate a PR that fixes this. My apologies for the hassle.

On Thu, 30 Aug 2018 at 17:22, Henk Koop notifications@github.com wrote:

@freekmurze https://github.com/freekmurze I believe this is a breaking change, because when the ServiceProvider tries to merge the default config with the one published in the project, only top-level keys (in this case 'cors_profile' and 'default_profile' are merged).

This means config('cors.default_profile.allow_credentials') will return null when the config file was published before this merge, and stuff blows up...

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/spatie/laravel-cors/pull/31#issuecomment-417359069, or mute the thread https://github.com/notifications/unsubscribe-auth/AAdiDcNLOjgdTZW1WvZPzY9DJ0fwlm7cks5uWAMbgaJpZM4WTLSD .

-- Freek Van der Herten https://spatie.be +32 495 84 27 91

mxaddict commented 6 years ago

Added the fix for this in #33