Skip to content

Commit

Permalink
Merge pull request #98 from ant-xuexiao/fix/revert-cors-header
Browse files Browse the repository at this point in the history
fix: revert cors header
  • Loading branch information
RaoHai authored Apr 25, 2024
2 parents d49a311 + 01673f5 commit 0b20a91
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion server/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import uvicorn
from fastapi import FastAPI
from fastapi.responses import StreamingResponse

from fastapi.middleware.cors import CORSMiddleware
from agent import stream

from uilts.env import get_env_variable
Expand All @@ -21,6 +21,15 @@
description="Agent Chat APIs"
)

app.add_middleware(
CORSMiddleware,
allow_origins=["*"],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
expose_headers=["*"],
)

app.include_router(health_checker.router)
app.include_router(github.router)
app.include_router(rag.router)
Expand Down

0 comments on commit 0b20a91

Please sign in to comment.