Prat0 commited on
Commit
db46cd6
·
verified ·
1 Parent(s): ce38f58

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -18,6 +18,13 @@ from fastapi.middleware.httpsredirect import HTTPSRedirectMiddleware
18
 
19
  app = FastAPI()
20
  #app.add_middleware(HTTPSRedirectMiddleware)
 
 
 
 
 
 
 
21
 
22
  # Initialize session state equivalent
23
  state = {
 
18
 
19
  app = FastAPI()
20
  #app.add_middleware(HTTPSRedirectMiddleware)
21
+ app.add_middleware(
22
+ CORSMiddleware,
23
+ allow_origins=["*"], # Adjust this to your needs
24
+ allow_credentials=True,
25
+ allow_methods=["*"],
26
+ allow_headers=["*"],
27
+ )
28
 
29
  # Initialize session state equivalent
30
  state = {