We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de321f5 commit da69529Copy full SHA for da69529
1 file changed
main.py
@@ -1,9 +1,20 @@
1
from fastapi import FastAPI
2
from app.routers.v1 import items
3
from app.routers import auth
4
+from fastapi.middleware.cors import CORSMiddleware
5
6
app = FastAPI()
7
8
+origins = ["*"]
9
+
10
+app.add_middleware(
11
+ CORSMiddleware,
12
+ allow_origins=origins,
13
+ allow_credentials=True,
14
+ allow_methods=["*"],
15
+ allow_headers=["*"],
16
+)
17
18
19
@app.get("/")
20
async def root():
0 commit comments