From 5eb691c665dc1af2d861d17881fa6ca3cb35a82a Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Thu, 30 Jan 2025 09:12:23 -0700 Subject: [PATCH] Simplify --- frigate/api/fastapi_app.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/frigate/api/fastapi_app.py b/frigate/api/fastapi_app.py index ae001c6b0..cf8e98536 100644 --- a/frigate/api/fastapi_app.py +++ b/frigate/api/fastapi_app.py @@ -70,9 +70,7 @@ def create_fastapi_app( @app.middleware("http") async def frigate_middleware(request: Request, call_next): # Before request - csrf_passed = check_csrf(request) - - if not csrf_passed: + if not check_csrf(request): return JSONResponse( content={"success": False, "message": "Missing CSRF header"}, status_code=401,