From 14f6273a004d4ac146e3052ddf670bf5646d94ad Mon Sep 17 00:00:00 2001 From: bbh <535597762@qq.com> Date: Mon, 4 Aug 2025 15:55:39 +0800 Subject: [PATCH] fix: config,py add backend_cors_origins --- backend/app/core/config.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/backend/app/core/config.py b/backend/app/core/config.py index 44e1f0a..416910a 100644 --- a/backend/app/core/config.py +++ b/backend/app/core/config.py @@ -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