This commit is contained in:
薇薇安 2026-01-13 19:46:07 +08:00
parent 0ae444b35f
commit 03acd93de4

View File

@ -31,7 +31,7 @@ app = FastAPI(
) )
# CORS配置允许React前端访问 # CORS配置允许React前端访问
cors_origins = os.getenv('CORS_ORIGINS', 'http://localhost:3000,http://localhost:5173').split(',') cors_origins = os.getenv('CORS_ORIGINS', 'http://localhost:3000,http://localhost:5173,http://as.deepx1.com').split(',')
app.add_middleware( app.add_middleware(
CORSMiddleware, CORSMiddleware,
allow_origins=cors_origins, allow_origins=cors_origins,