1
0

Audit cleanup: security fixes, code reduction, test hygiene (#131)

This commit is contained in:
Alexander Whitestone
2026-03-05 18:56:52 -05:00
committed by GitHub
parent e8f1dea3ec
commit aff3edb06a
33 changed files with 160 additions and 591 deletions

View File

@@ -187,7 +187,7 @@ class CSRFMiddleware(BaseHTTPMiddleware):
"/lightning/webhook",
"/_internal/",
]
return any(pattern in path for pattern in exempt_patterns)
return any(path.startswith(pattern) for pattern in exempt_patterns)
async def _validate_request(self, request: Request, csrf_cookie: Optional[str]) -> bool:
"""Validate the CSRF token in the request.