This commit is contained in:
aaron 2026-04-08 01:01:09 +08:00
parent 31d8a1fcaf
commit b360b197a7
5 changed files with 3 additions and 3 deletions

View File

@ -16,4 +16,4 @@ ASTOCK_ADMIN_USERNAME=admin
ASTOCK_ADMIN_PASSWORD=替换为一个安全密码
# 前端地址(用于 CORS
ASTOCK_FRONTEND_URL=http://your-server-ip:3000
ASTOCK_FRONTEND_URL=http://your-server-ip:3001

View File

@ -51,7 +51,7 @@ class Settings(BaseSettings):
llm_temperature: float = 0.3
# 前端
frontend_url: str = "http://localhost:3000"
frontend_url: str = "http://localhost:3001"
# JWT 认证
jwt_secret: str = "change-me-in-production"

View File

@ -67,7 +67,7 @@ app = FastAPI(
# CORS
app.add_middleware(
CORSMiddleware,
allow_origins=[settings.frontend_url, "http://localhost:3000"],
allow_origins=[settings.frontend_url, "http://localhost:3001"],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],