mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Fix ingress routing with / (#22728)
This commit is contained in:
parent
e29eb4fa23
commit
9bb88a6143
@ -30,7 +30,7 @@ class HassIOIngress(HomeAssistantView):
|
||||
"""Hass.io view to handle base part."""
|
||||
|
||||
name = "api:hassio:ingress"
|
||||
url = "/api/hassio_ingress/{token}/{path:.+}"
|
||||
url = "/api/hassio_ingress/{token}/{path:.*}"
|
||||
requires_auth = False
|
||||
|
||||
def __init__(self, host: str, websession: aiohttp.ClientSession):
|
||||
|
@ -8,7 +8,8 @@ import pytest
|
||||
@pytest.mark.parametrize(
|
||||
'build_type', [
|
||||
("a3_vl", "test/beer/ping?index=1"), ("core", "index.html"),
|
||||
("local", "panel/config"), ("jk_921", "editor.php?idx=3&ping=5")
|
||||
("local", "panel/config"), ("jk_921", "editor.php?idx=3&ping=5"),
|
||||
("fsadjf10312", "")
|
||||
])
|
||||
async def test_ingress_request_get(
|
||||
hassio_client, build_type, aioclient_mock):
|
||||
@ -40,7 +41,8 @@ async def test_ingress_request_get(
|
||||
@pytest.mark.parametrize(
|
||||
'build_type', [
|
||||
("a3_vl", "test/beer/ping?index=1"), ("core", "index.html"),
|
||||
("local", "panel/config"), ("jk_921", "editor.php?idx=3&ping=5")
|
||||
("local", "panel/config"), ("jk_921", "editor.php?idx=3&ping=5"),
|
||||
("fsadjf10312", "")
|
||||
])
|
||||
async def test_ingress_request_post(
|
||||
hassio_client, build_type, aioclient_mock):
|
||||
@ -72,7 +74,8 @@ async def test_ingress_request_post(
|
||||
@pytest.mark.parametrize(
|
||||
'build_type', [
|
||||
("a3_vl", "test/beer/ping?index=1"), ("core", "index.html"),
|
||||
("local", "panel/config"), ("jk_921", "editor.php?idx=3&ping=5")
|
||||
("local", "panel/config"), ("jk_921", "editor.php?idx=3&ping=5"),
|
||||
("fsadjf10312", "")
|
||||
])
|
||||
async def test_ingress_request_put(
|
||||
hassio_client, build_type, aioclient_mock):
|
||||
@ -104,7 +107,8 @@ async def test_ingress_request_put(
|
||||
@pytest.mark.parametrize(
|
||||
'build_type', [
|
||||
("a3_vl", "test/beer/ping?index=1"), ("core", "index.html"),
|
||||
("local", "panel/config"), ("jk_921", "editor.php?idx=3&ping=5")
|
||||
("local", "panel/config"), ("jk_921", "editor.php?idx=3&ping=5"),
|
||||
("fsadjf10312", "")
|
||||
])
|
||||
async def test_ingress_request_delete(
|
||||
hassio_client, build_type, aioclient_mock):
|
||||
|
Loading…
x
Reference in New Issue
Block a user