changes
This commit is contained in:
@@ -26,8 +26,8 @@ class LoggingMiddleware(BaseHTTPMiddleware):
|
||||
correlation_id = request.headers.get("x-correlation-id") or request.headers.get("x-request-id") or str(uuid4())
|
||||
request.state.correlation_id = correlation_id
|
||||
|
||||
# Skip logging for static files and health checks (still attach correlation id)
|
||||
skip_paths = ["/static/", "/uploads/", "/health", "/favicon.ico"]
|
||||
# Skip logging for static files, health checks, and metrics (still attach correlation id)
|
||||
skip_paths = ["/static/", "/uploads/", "/health", "/metrics", "/favicon.ico"]
|
||||
if any(request.url.path.startswith(path) for path in skip_paths):
|
||||
response = await call_next(request)
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user