Move imports in http component (#27474)
This commit is contained in:
parent
96d35379f2
commit
ee8b72fb71
1 changed files with 1 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
|||
"""Provide CORS support for the HTTP component."""
|
||||
import aiohttp_cors
|
||||
from aiohttp.web_urldispatcher import Resource, ResourceRoute, StaticResource
|
||||
from aiohttp.hdrs import ACCEPT, CONTENT_TYPE, ORIGIN, AUTHORIZATION
|
||||
|
||||
|
@ -22,8 +23,6 @@ VALID_CORS_TYPES = (Resource, ResourceRoute, StaticResource)
|
|||
@callback
|
||||
def setup_cors(app, origins):
|
||||
"""Set up CORS."""
|
||||
import aiohttp_cors
|
||||
|
||||
cors = aiohttp_cors.setup(
|
||||
app,
|
||||
defaults={
|
||||
|
|
Loading…
Add table
Reference in a new issue