forked from Rockachopa/Timmy-time-dashboard
Audit cleanup: security fixes, code reduction, test hygiene (#131)
This commit is contained in:
committed by
GitHub
parent
e8f1dea3ec
commit
aff3edb06a
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user