mudaza commited on
Commit
7b18189
·
1 Parent(s): 0bfe0d7

CORS modificaiton

Browse files
Files changed (1) hide show
  1. app.py +11 -11
app.py CHANGED
@@ -3,18 +3,18 @@ from fastapi.middleware.cors import CORSMiddleware
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():
 
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():