nelmio / NelmioCorsBundle

Adds CORS (Cross-Origin Resource Sharing) headers support in your Symfony application
https://symfony.com/bundles/NelmioCorsBundle/
MIT License
1.89k stars 108 forks source link

version 2.0 breaks API Platform #139

Closed ro0NL closed 4 years ago

ro0NL commented 4 years ago

1.5

https://github.com/nelmio/NelmioCorsBundle/blob/10a24c10f242440211ed31075e74f81661c690d9/Resources/config/services.xml#L17

master / 2.0

https://github.com/nelmio/NelmioCorsBundle/blob/5e6eace16e3bed3aaca237d45ab4b325c65f41b5/Resources/config/services.xml#L16

This breaks browser preflight requests (OPTIONS) resulting in 405: Method not allowed.

ro0NL commented 4 years ago

ok found, https://github.com/nelmio/NelmioCorsBundle/pull/125 :)

fair this is changed in a new major, we're trying to find compatibility though

fabpot commented 4 years ago

Does it mean that we should split the listener? Having some code running early and some other running late?

ro0NL commented 4 years ago

@fabpot not sure, i mentioned to @dunglas API-platform is current incomptaible with NelmioCorsBundle 2.0, yet it bumped the deps :)

I think it needs a fix in API platform.

ro0NL commented 4 years ago

closing as such. NelmioCorsBundle 1.5 + API Platform works fine.