diff options
Diffstat (limited to 'aiohttp_cors/abc.py')
-rw-r--r-- | aiohttp_cors/abc.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/aiohttp_cors/abc.py b/aiohttp_cors/abc.py index cdddd36..5204a83 100644 --- a/aiohttp_cors/abc.py +++ b/aiohttp_cors/abc.py @@ -15,7 +15,6 @@ """Abstract base classes. """ -import asyncio from abc import ABCMeta, abstractmethod from aiohttp import web @@ -51,7 +50,10 @@ class AbstractRouterAdapter(metaclass=ABCMeta): """ @abstractmethod - def add_preflight_handler(self, routing_entity, handler): + def add_preflight_handler(self, + routing_entity, + handler, + webview: bool=False): """Add OPTIONS handler for all routes defined by `routing_entity`. Does nothing if CORS handler already handles routing entity. @@ -79,9 +81,8 @@ class AbstractRouterAdapter(metaclass=ABCMeta): entity. """ - @asyncio.coroutine @abstractmethod - def get_preflight_request_config( + async def get_preflight_request_config( self, preflight_request: web.Request, origin: str, |