Skip to content

Instantly share code, notes, and snippets.

James Brooking jambroo

Block or report user

Report or block jambroo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kamalgill
kamalgill / cors.py
Created Mar 18, 2016 — forked from mmerickel/cors.py
cors in pyramid
View cors.py
from pyramid.security import NO_PERMISSION_REQUIRED
def includeme(config):
config.add_directive(
'add_cors_preflight_handler', add_cors_preflight_handler)
config.add_route_predicate('cors_preflight', CorsPreflightPredicate)
config.add_subscriber(add_cors_to_response, 'pyramid.events.NewResponse')
class CorsPreflightPredicate(object):
You can’t perform that action at this time.