Skip to content

Instantly share code, notes, and snippets.

@espretto
espretto / asyncio_cors.py
Created April 28, 2017 18:45
cors middleware for asyncio
from aiohttp import web
web.Application(middlewares=[cors_factory])
ALLOWED_HEADERS = ','.join((
'content-type',
'accept',
'origin',
'authorization',
'x-requested-with',