quivr/backend/middlewares/cors.py
Stan Girard 3a2e0e7336
feat: new landing page (#2264)
This pull request updates the origins in cors.py, origin in
resend_invitation_email.py, and referring_site in
add-new-email/index.ts. It also refactors the code in home/page.tsx and
next.config.js.
2024-02-25 18:09:01 -08:00

24 lines
500 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",
"https://chat.quivr.app",
"*",
]
def add_cors_middleware(app):
app.add_middleware(
CORSMiddleware,
allow_origins=origins,
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)