a
This commit is contained in:
parent
0ae444b35f
commit
03acd93de4
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user