mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Move imports in http component (#27474)
This commit is contained in:
parent
96d35379f2
commit
ee8b72fb71
@ -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…
x
Reference in New Issue
Block a user