mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 04:07:08 +00:00
Revert CORS changes for my home assistant (#47064)
* Revert CORS changes for my home assistant * Update test_init.py * Update test_init.py
This commit is contained in:
parent
d084291055
commit
e3105c7eb1
@ -178,7 +178,6 @@ class APIDiscoveryView(HomeAssistantView):
|
|||||||
requires_auth = False
|
requires_auth = False
|
||||||
url = URL_API_DISCOVERY_INFO
|
url = URL_API_DISCOVERY_INFO
|
||||||
name = "api:discovery"
|
name = "api:discovery"
|
||||||
cors_allowed = True
|
|
||||||
|
|
||||||
async def get(self, request):
|
async def get(self, request):
|
||||||
"""Get discovery information."""
|
"""Get discovery information."""
|
||||||
|
@ -59,7 +59,7 @@ _LOGGER = logging.getLogger(__name__)
|
|||||||
DEFAULT_DEVELOPMENT = "0"
|
DEFAULT_DEVELOPMENT = "0"
|
||||||
# Cast to be able to load custom cards.
|
# Cast to be able to load custom cards.
|
||||||
# My to be able to check url and version info.
|
# 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
|
NO_LOGIN_ATTEMPT_THRESHOLD = -1
|
||||||
|
|
||||||
MAX_CLIENT_SIZE: int = 1024 ** 2 * 16
|
MAX_CLIENT_SIZE: int = 1024 ** 2 * 16
|
||||||
|
@ -175,10 +175,7 @@ async def test_cors_defaults(hass):
|
|||||||
assert await async_setup_component(hass, "http", {})
|
assert await async_setup_component(hass, "http", {})
|
||||||
|
|
||||||
assert len(mock_setup.mock_calls) == 1
|
assert len(mock_setup.mock_calls) == 1
|
||||||
assert mock_setup.mock_calls[0][1][1] == [
|
assert mock_setup.mock_calls[0][1][1] == ["https://cast.home-assistant.io"]
|
||||||
"https://cast.home-assistant.io",
|
|
||||||
"https://my.home-assistant.io",
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
async def test_storing_config(hass, aiohttp_client, aiohttp_unused_port):
|
async def test_storing_config(hass, aiohttp_client, aiohttp_unused_port):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user