diff --git a/homeassistant/components/api/__init__.py b/homeassistant/components/api/__init__.py index a82309094e3..e40a9332c38 100644 --- a/homeassistant/components/api/__init__.py +++ b/homeassistant/components/api/__init__.py @@ -178,7 +178,6 @@ class APIDiscoveryView(HomeAssistantView): requires_auth = False url = URL_API_DISCOVERY_INFO name = "api:discovery" - cors_allowed = True async def get(self, request): """Get discovery information.""" diff --git a/homeassistant/components/http/__init__.py b/homeassistant/components/http/__init__.py index d09cfe754a9..993d466ae18 100644 --- a/homeassistant/components/http/__init__.py +++ b/homeassistant/components/http/__init__.py @@ -59,7 +59,7 @@ _LOGGER = logging.getLogger(__name__) DEFAULT_DEVELOPMENT = "0" # Cast to be able to load custom cards. # My to be able to check url and version info. -DEFAULT_CORS = ["https://cast.home-assistant.io", "https://my.home-assistant.io"] +DEFAULT_CORS = ["https://cast.home-assistant.io"] NO_LOGIN_ATTEMPT_THRESHOLD = -1 MAX_CLIENT_SIZE: int = 1024 ** 2 * 16 diff --git a/tests/components/http/test_init.py b/tests/components/http/test_init.py index 9621b269081..993f0dba1fd 100644 --- a/tests/components/http/test_init.py +++ b/tests/components/http/test_init.py @@ -175,10 +175,7 @@ async def test_cors_defaults(hass): assert await async_setup_component(hass, "http", {}) assert len(mock_setup.mock_calls) == 1 - assert mock_setup.mock_calls[0][1][1] == [ - "https://cast.home-assistant.io", - "https://my.home-assistant.io", - ] + assert mock_setup.mock_calls[0][1][1] == ["https://cast.home-assistant.io"] async def test_storing_config(hass, aiohttp_client, aiohttp_unused_port):