Fix HIGH priority issues: unbounded queries, rate limiting, health checks

Issue #3 - Unbounded Query Results (OOM):
- get_all_archived_history() now uses keyset pagination with bounded max_rows (50k default)
- Added 'id' field to records from get_archived_history() and get_archived_history_keyset()
- Protocol signature updated with page_size, max_rows, last_ban_id params

Issue #7 - Docker Health Check Fails:
- Added curl to Dockerfile.backend runtime image
- HEALTHCHECK now uses 'curl -f http://localhost:8000/api/health'
- compose.prod.yml: increased start_period to 40s, timeout to 10s
- Frontend healthcheck proxies to backend /api/health

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-05-01 21:47:36 +02:00
parent 1830da496d
commit 0d5882b32f
39 changed files with 2067 additions and 339 deletions

View File

@@ -13,6 +13,7 @@ from __future__ import annotations
from fastapi import APIRouter, Request, status
from app.dependencies import AuthDep, Fail2BanSocketDep
from app.mappers import server_mappers
from app.models.server import ServerSettingsResponse, ServerSettingsUpdate
from app.services import server_service
@@ -49,7 +50,8 @@ async def get_server_settings(
Raises:
HTTPException: 502 when fail2ban is unreachable.
"""
return await server_service.get_settings(socket_path)
domain_result = await server_service.get_settings(socket_path)
return server_mappers.map_domain_server_settings_result_to_response(domain_result)
@router.put(