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,