diff --git a/src/presentation/routing/csrf.py b/src/presentation/routing/csrf.py index f921ed5..ad5a822 100644 --- a/src/presentation/routing/csrf.py +++ b/src/presentation/routing/csrf.py @@ -1,5 +1,5 @@ from __future__ import annotations -from fastapi import APIRouter +from fastapi import APIRouter, Request from fastapi.responses import ORJSONResponse from starlette import status from src.infrastructure.security import CsrfService @@ -11,7 +11,7 @@ csrf_router = APIRouter(prefix='/csrf', tags=['csrf']) @csrf_router.get('/token', response_class=ORJSONResponse, status_code=status.HTTP_200_OK) @rate_limit(limit=settings.RATE_LIMIT_REQUESTS, window_seconds=settings.RATE_LIMIT_WINDOW, scope='ip') -async def issue_csrf_token(): +async def issue_csrf_token(request: Request): csrf = CsrfService() token = csrf.issue()