Spaces:
Sleeping
Sleeping
CORS modificaiton
Browse files
app.py
CHANGED
@@ -3,18 +3,18 @@ from fastapi.middleware.cors import CORSMiddleware
|
|
3 |
|
4 |
app = FastAPI()
|
5 |
|
6 |
-
origins = [
|
7 |
-
|
8 |
-
|
9 |
-
]
|
10 |
|
11 |
-
app.add_middleware(
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
)
|
18 |
|
19 |
@app.get("/")
|
20 |
def greet_json():
|
|
|
3 |
|
4 |
app = FastAPI()
|
5 |
|
6 |
+
# origins = [
|
7 |
+
# "http://localhost",
|
8 |
+
# "http://localhost:8080",
|
9 |
+
# ]
|
10 |
|
11 |
+
# app.add_middleware(
|
12 |
+
# CORSMiddleware,
|
13 |
+
# allow_origins=origins,
|
14 |
+
# allow_credentials=True,
|
15 |
+
# allow_methods=["*"],
|
16 |
+
# allow_headers=["*"],
|
17 |
+
# )
|
18 |
|
19 |
@app.get("/")
|
20 |
def greet_json():
|