diff --git a/server/middleware/turnstile.py b/server/middleware/turnstile.py index 6b26ac0..ed9666c 100644 --- a/server/middleware/turnstile.py +++ b/server/middleware/turnstile.py @@ -31,7 +31,7 @@ async def dispatch( request.state.turnstile_outcome = TurnstileOutcome.NO_TOKEN() return await call_next(request) - client = request.state.http_client + client = request.state.cf_http_client response = await client.post( "/turnstile/v0/siteverify/", timeout=5, diff --git a/server/types.py b/server/types.py index 5bde3d9..187d20c 100644 --- a/server/types.py +++ b/server/types.py @@ -10,7 +10,8 @@ class State(TypedDict): - http_client: httpx.AsyncClient + cf_http_client: httpx.AsyncClient + gh_http_client: httpx.AsyncClient db: async_sessionmaker[AsyncSession]