♻️ Use FASTAPI_ENV for development (#2427)

## AI Disclaimer

Using Codex with gpt-5.6-sol. Reviewed manually.
This commit is contained in:
Sebastián Ramírez
2026-08-10 23:21:59 +02:00
committed by GitHub
parent 111c5fad66
commit e95e501951
5 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -33,7 +33,7 @@ class Settings(BaseSettings):
# 60 minutes * 24 hours * 8 days = 8 days
ACCESS_TOKEN_EXPIRE_MINUTES: int = 60 * 24 * 8
FRONTEND_HOST: str = "http://localhost:5173"
ENVIRONMENT: Literal["local"] | None = None
FASTAPI_ENV: Literal["development"] | None = None
BACKEND_CORS_ORIGINS: Annotated[
list[AnyUrl] | str, BeforeValidator(parse_cors)
@@ -98,7 +98,7 @@ class Settings(BaseSettings):
f'The value of {var_name} is "changethis", '
"for security, please change it, at least for deployments."
)
if self.ENVIRONMENT == "local":
if self.FASTAPI_ENV == "development":
warnings.warn(message, stacklevel=1)
else:
raise ValueError(message)