Update app.py
Browse files
app.py
CHANGED
|
@@ -26,20 +26,16 @@ app=FastAPI()
|
|
| 26 |
|
| 27 |
|
| 28 |
|
|
|
|
| 29 |
|
| 30 |
|
| 31 |
-
client=provideClient()
|
| 32 |
-
origins=[
|
| 33 |
-
"http://localhost:3000",
|
| 34 |
-
"http://localhost:3001"
|
| 35 |
-
]
|
| 36 |
|
| 37 |
app.add_middleware(
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
)
|
| 44 |
|
| 45 |
|
|
|
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
+
origins=["*"]
|
| 30 |
|
| 31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
app.add_middleware(
|
| 34 |
+
CORSMiddleware,
|
| 35 |
+
allow_origins=origins,
|
| 36 |
+
allow_credentials=True,
|
| 37 |
+
allow_methods=["*"],
|
| 38 |
+
allow_headers=["*"],
|
| 39 |
)
|
| 40 |
|
| 41 |
|