fix: config,py add backend_cors_origins
Some checks failed
Deploy to Staging / deploy (push) Has been cancelled
Lint Backend / lint-backend (push) Has been cancelled
Playwright Tests / changes (push) Has been cancelled
Playwright Tests / test-playwright (1, 4) (push) Has been cancelled
Playwright Tests / test-playwright (2, 4) (push) Has been cancelled
Playwright Tests / test-playwright (3, 4) (push) Has been cancelled
Playwright Tests / test-playwright (4, 4) (push) Has been cancelled
Playwright Tests / merge-playwright-reports (push) Has been cancelled
Playwright Tests / alls-green-playwright (push) Has been cancelled
Test Backend / test-backend (push) Has been cancelled
Test Docker Compose / test-docker-compose (push) Has been cancelled

This commit is contained in:
bbh
2025-08-04 15:55:39 +08:00
parent fd4788b6e2
commit 14f6273a00

View File

@@ -35,13 +35,16 @@ class Settings(BaseSettings):
SECRET_KEY: str = secrets.token_urlsafe(32)
# 60 minutes * 24 hours * 8 days = 8 days
ACCESS_TOKEN_EXPIRE_MINUTES: int = 60 * 24 * 8
# FRONTEND_HOST: str = "http://localhost:5173"
FRONTEND_HOST: str = "https://dashboard.daheimao.top"
FRONTEND_HOST: str = "http://localhost:5173"
# FRONTEND_HOST: str = "https://dashboard.daheimao.top"
ENVIRONMENT: Literal["local", "staging", "production"] = "local"
BACKEND_CORS_ORIGINS: Annotated[
list[AnyUrl] | str, BeforeValidator(parse_cors)
] = []
] = [
"http://dashboard.daheimao.top",
"https://dashboard.daheimao.top",
]
@computed_field # type: ignore[prop-decorator]
@property