Skip to content

Commit dae8d6c

Browse files
committed
feat: remove cros mideware
1 parent cf0d67d commit dae8d6c

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

server/main.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import uvicorn
44
from fastapi import FastAPI
55
from fastapi.responses import StreamingResponse
6-
from fastapi.middleware.cors import CORSMiddleware
76
from starlette.middleware.sessions import SessionMiddleware
87

98
from agent import stream
@@ -23,13 +22,6 @@
2322
description="Agent Chat APIs"
2423
)
2524

26-
app.add_middleware(
27-
CORSMiddleware,
28-
allow_origins=["*"], # 明确指定允许的源
29-
allow_credentials=True,
30-
allow_methods=["*"], # 允许所有方法
31-
allow_headers=["*"], # 允许所有头部
32-
)
3325
app.add_middleware(
3426
SessionMiddleware,
3527
secret_key = session_secret_key,

0 commit comments

Comments
 (0)