Re: [pylons-discuss] How to use Pyramid's add_view dynamically add CORS handler views based on views we had in config?

2017-06-08 Thread Michael Merickel
On Thu, Jun 8, 2017 at 12:11 AM, Fang-Pen Lin wrote: > Kind of able to do what I want, but still, it's not really ideal, as it > applies to the whole app. Sometimes, I want to have fine-grand control over > CORS for different endpoints. > > For example, I may can define

[pylons-discuss] How to use Pyramid's add_view dynamically add CORS handler views based on views we had in config?

2017-06-07 Thread Fang-Pen Lin
Hi guys, I have a traversal based pyramid web app, there are controllers like this @view_defaults( context=UserResource, renderer='json', ) class UserController(ControllerBase): @view_config(request_method='GET', permission='view') def get(self): user =