uzi007 commited on
Commit
6a2ef99
1 Parent(s): 36cd0e8

Added CORS in main app

Browse files
Files changed (1) hide show
  1. main.py +13 -13
main.py CHANGED
@@ -24,19 +24,19 @@ output_folder = 'Output'
24
  # Create a context variable to store the contexts for each user
25
  users_context = dict()
26
 
27
- # # CORS (Cross-Origin Resource Sharing)
28
- # origins = [
29
- # "http://localhost",
30
- # "http://localhost:4200",
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
 
42
  ### APIs
 
24
  # Create a context variable to store the contexts for each user
25
  users_context = dict()
26
 
27
+ # CORS (Cross-Origin Resource Sharing)
28
+ origins = [
29
+ "http://localhost",
30
+ "http://localhost:4200",
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
 
42
  ### APIs