Skip to content

Commit

Permalink
fix: revert cors header
Browse files Browse the repository at this point in the history
  • Loading branch information
RaoHai committed Apr 25, 2024
1 parent d49a311 commit 01673f5
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 01673f5

Please sign in to comment.