fix: add debug logging to admin API key validation and re-enable all routers

- Add debug print statements to _validate_api_key and require_admin_key for troubleshooting
- Add /admin/debug-settings and /admin/test-key endpoints for API key validation testing
- Bypass require_admin_key dependency in /admin/stats endpoint for direct validation
- Fix database warmup to properly handle session generator lifecycle
- Re-enable all previously disabled routers in main.py
- Add custom OpenAPI security scheme
This commit is contained in:
oib
2026-03-05 13:44:37 +01:00
parent b44aeaad97
commit 83b5152b40
12 changed files with 556 additions and 65 deletions

View File

@@ -40,8 +40,9 @@ def dashboard(ctx, refresh: int, duration: int):
with httpx.Client(timeout=5) as client:
# Get dashboard data
try:
url = f"{config.coordinator_url}/api/v1/dashboard"
resp = client.get(
f"{config.coordinator_url}/dashboard",
url,
headers={"X-Api-Key": config.api_key or ""}
)
if resp.status_code == 200: