I'm utilizing Cornice for an API I'm developing with Pyramid. I have a number of Cornice resources defined throughout my app and I need to implement the same CORS policy for each of them ( http://cornice.readthedocs.org/en/latest/api.html). Does anyone know if it's possible to configure a the cors_policy globally for all resources instead of having to set the policy for every resource definition?
Currently, I have to do the following for every resource: from config import CORS_POLICY @resource(path='/login', renderer='json', cors_policy= CORS_POLICY) class LoginService(object): ... As you can see, this is not very DRY. It would be nice if I could configure the Cornice CORS policy in the application's *main* function. -Vincent -- Vincent Catalano Software Engineer and Web Developer, (520).603.8944 -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
