jdesrosiers / silex-cors-provider

A silex service provider that adds CORS services to silex
MIT License
78 stars 25 forks source link

Cors: isCorsRequest() and isPreflightRequest() made public + tests #23

Closed MacDada closed 8 years ago

MacDada commented 8 years ago

https://github.com/jdesrosiers/silex-cors-provider/issues/22

jdesrosiers commented 8 years ago

I don't think this is right solution. I think the filter functionality and the CORS functionality need to be extracted into different classes. The filter class would call the CORS class. That would allow you access to the functions you need without giving behavior to the filter class that doesn't involve the filter. This design decision has been bothering me for a while. I knew at some point something like this would come up.

MacDada commented 8 years ago

I think the filter functionality and the CORS functionality need to be extracted into different classes.

I totally agree, but wasn't sure if this is a right time for larger refactorings ;)

jdesrosiers commented 8 years ago

It's always a good time for refactorings!

jdesrosiers commented 8 years ago

Closing this pull request because we are taking another approach. See #24