fix rate_limit tests and add prod_mode to env

This commit is contained in:
2026-09-05 23:02:42 +03:00
parent 5cdcd342dc
commit ba5e90c516
4 changed files with 9 additions and 5 deletions
+2
View File
@@ -20,6 +20,8 @@ class Env(Base):
REDIS_PORT:int
REDIS_HOST:str
PROD_MODE:bool
model_config=SettingsConfigDict(env_file="configs/.env", extra=None)
env_settings=Env() # type: ignore[call-arg]
+2 -2
View File
@@ -38,7 +38,7 @@ async def get_access_token(request: Request,
key="refresh_token",
value=refresh_token,
httponly=True,
secure=True,
secure=env_settings.PROD_MODE,
samesite="strict",
max_age=env_settings.REFRESH_TOKEN_EXPIRE_DAYS * 24 * 60 * 60
)
@@ -57,7 +57,7 @@ async def get_refresh_token(request:Request,
key="refresh_token",
value=refresh_token,
httponly=True,
secure=True,
secure=env_settings.PROD_MODE,
samesite="strict",
max_age=env_settings.REFRESH_TOKEN_EXPIRE_DAYS * 24 * 60 * 60
)