mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-14 17:03:29 +03:00
23 lines
470 B
Python
23 lines
470 B
Python
from fastapi.middleware.cors import CORSMiddleware
|
|
|
|
origins = [
|
|
"http://localhost",
|
|
"http://localhost:3000",
|
|
"http://localhost:3001",
|
|
"https://quivr.app",
|
|
"https://www.quivr.app",
|
|
"http://quivr.app",
|
|
"http://www.quivr.app",
|
|
"*",
|
|
]
|
|
|
|
|
|
def add_cors_middleware(app):
|
|
app.add_middleware(
|
|
CORSMiddleware,
|
|
allow_origins=origins,
|
|
allow_credentials=True,
|
|
allow_methods=["*"],
|
|
allow_headers=["*"],
|
|
)
|