router and fix backend cors

This commit is contained in:
IluaAir
2025-10-09 23:31:32 +03:00
parent 3708a612f7
commit 1f351bc32b
7 changed files with 182 additions and 5 deletions

View File

@@ -42,11 +42,17 @@ class RefreshToken(BaseModel):
expire_days: int
class CorsSettings(BaseModel):
production: str
local: list[str] = ["http://localhost:5173", "http://localhost:5174"]
class Settings(BaseSettings):
api: ApiPrefix = ApiPrefix()
db: DbSettings = DbSettings()
access_token: AccessToken
refresh_token: RefreshToken
cors_settings: CorsSettings
model_config = SettingsConfigDict(
env_file=".env", env_file_encoding="utf-8", env_nested_delimiter="__"
)