fix: add request in csrf endpoint
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user