diff --git a/homeassistant/components/http/cors.py b/homeassistant/components/http/cors.py index 39ff45fd4e4..bd821335542 100644 --- a/homeassistant/components/http/cors.py +++ b/homeassistant/components/http/cors.py @@ -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={