mirror of
https://github.com/StanGirard/quivr.git
synced 2024-12-27 13:22:44 +03:00
a3ca7ecb37
* feat(docker): added docker for prod * feat(refacto): moved to modules
22 lines
440 B
Python
22 lines
440 B
Python
from fastapi.middleware.cors import CORSMiddleware
|
|
|
|
origins = [
|
|
"http://localhost",
|
|
"http://localhost:3000",
|
|
"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=["*"],
|
|
)
|