chore(discord-bridge): dashboard-ul se muta de pe /punte pe /claude
https://claude-agent.tailf7372d.ts.net/claude Redenumire completa: tailscale serve, DASHBOARD_PREFIX, teste, documentatie, ops/install.sh (implicitul pentru instalari noi). Vechiul /punte a fost scos din serve si intoarce 404. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B29CApsP1JkSdjYaGaHpE7
This commit is contained in:
@@ -340,9 +340,9 @@ def test_ruta_necunoscuta(server):
|
||||
|
||||
@pytest.fixture()
|
||||
def server_cu_prefix(server, state_dir):
|
||||
"""Acelasi server, dar cu DASHBOARD_PREFIX=/punte in env."""
|
||||
"""Acelasi server, dar cu DASHBOARD_PREFIX=/claude in env."""
|
||||
(state_dir / "env").write_text(
|
||||
"DASHBOARD_TOKEN=secret-de-test\nDASHBOARD_PREFIX=/punte\n", encoding="utf-8")
|
||||
"DASHBOARD_TOKEN=secret-de-test\nDASHBOARD_PREFIX=/claude\n", encoding="utf-8")
|
||||
config.reload(state_dir)
|
||||
return server
|
||||
|
||||
@@ -355,29 +355,29 @@ def test_rutele_merg_si_cu_prefix_si_fara(server_cu_prefix):
|
||||
"""Proxy-ul taie prefixul, dar `curl` direct pe localhost nu — merg ambele."""
|
||||
server_cu_prefix.login()
|
||||
assert server_cu_prefix.call("/api/status")[0] == 200
|
||||
assert server_cu_prefix.call("/punte/api/status")[0] == 200
|
||||
assert server_cu_prefix.call("/claude/api/status")[0] == 200
|
||||
|
||||
|
||||
def test_prefixul_gol_nu_taie_nimic(server):
|
||||
server.login()
|
||||
assert server.call("/api/status")[0] == 200
|
||||
assert server.call("/punte/api/status")[0] == 404
|
||||
assert server.call("/claude/api/status")[0] == 404
|
||||
|
||||
|
||||
def test_redirect_de_login_pastreaza_prefixul(server_cu_prefix):
|
||||
"""Un `/login.html` absolut ar arunca browserul in radacina hostului."""
|
||||
status, _, resp = server_cu_prefix.call("/punte/")
|
||||
status, _, resp = server_cu_prefix.call("/claude/")
|
||||
assert status == 200
|
||||
assert resp.url.endswith("/punte/login.html")
|
||||
assert resp.url.endswith("/claude/login.html")
|
||||
|
||||
|
||||
def test_calea_fara_slash_final_e_redirectionata(server_cu_prefix):
|
||||
"""`/punte` fara slash ar rezolva `api/status` la radacina hostului."""
|
||||
_, _, resp = server_cu_prefix.call("/punte")
|
||||
assert resp.url.endswith("/punte/login.html")
|
||||
"""`/claude` fara slash ar rezolva `api/status` la radacina hostului."""
|
||||
_, _, resp = server_cu_prefix.call("/claude")
|
||||
assert resp.url.endswith("/claude/login.html")
|
||||
|
||||
|
||||
def test_static_servit_si_sub_prefix(server_cu_prefix):
|
||||
server_cu_prefix.login()
|
||||
status, data, _ = server_cu_prefix.call("/punte/static/app.css")
|
||||
status, data, _ = server_cu_prefix.call("/claude/static/app.css")
|
||||
assert status == 200 and ".card" in data["_html"]
|
||||
|
||||
Reference in New Issue
Block a user