feat: log additional request information for non-suspicious access

This commit is contained in:
Lorenzo Venerandi
2026-02-22 18:36:33 +01:00
parent 9a271cbe68
commit aa49853949

View File

@@ -398,6 +398,10 @@ async def trap_page(request: Request, path: str):
access_logger.warning(
f"[SUSPICIOUS] {client_ip} - {user_agent[:50]} - {full_path}"
)
else:
access_logger.info(
f"[REQUEST] {client_ip} - {full_path}"
)
# Record access unless the router dependency already handled it
# (attack pattern or honeypot path → already recorded by _track_honeypot_request)