mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-16 14:05:10 +00:00
fix(api)!: key the health route and keep server internals from user keys
/api/health needs X-Secret-Key but stays outside the rate limit. Only the admin key gets load_errors from /api/services, default error details no longer name the exception class, and a prepare signal replaces aiohttp's Server banner on every response while the CDM routes keep their own.
This commit is contained in:
@@ -249,7 +249,7 @@ async def test_since_cursor_and_dashboard_key(aiohttp_client, serve_app) -> None
|
||||
assert (await client.get("/api/dashboard/cdm-logs")).status == 401
|
||||
assert (await client.get("/api/dashboard/cdm-logs", headers=USER)).status == 401
|
||||
# Only the device routes are CDM calls: not the API, not the ping, not this route.
|
||||
await client.get("/api/health")
|
||||
await client.get("/api/health", headers=USER)
|
||||
await client.get("/", headers=USER)
|
||||
|
||||
page = await cdm_log(client, since=1)
|
||||
|
||||
Reference in New Issue
Block a user