Harshilforworks commited on
Commit
046011f
·
verified ·
1 Parent(s): b949a69

Upload main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -11
main.py CHANGED
@@ -40,19 +40,11 @@ logging.basicConfig(level=logging.INFO)
40
  logger = logging.getLogger(__name__)
41
 
42
  # Add CORS middleware
43
- # Note: When allow_credentials=True, you cannot use allow_origins=["*"]
44
- # Must specify exact origins
45
- # Chrome extensions make requests from background scripts which bypass CORS,
46
- # but we include common origins for web frontend access
47
  app.add_middleware(
48
  CORSMiddleware,
49
- allow_origins=[
50
- "http://localhost:5173",
51
- "http://127.0.0.1:5173",
52
- "http://localhost:3000",
53
- "http://127.0.0.1:3000",
54
- ],
55
- allow_credentials=True,
56
  allow_methods=["*"],
57
  allow_headers=["*"],
58
  )
 
40
  logger = logging.getLogger(__name__)
41
 
42
  # Add CORS middleware
43
+ # Allow all origins for accessibility
 
 
 
44
  app.add_middleware(
45
  CORSMiddleware,
46
+ allow_origins=["*"],
47
+ allow_credentials=False,
 
 
 
 
 
48
  allow_methods=["*"],
49
  allow_headers=["*"],
50
  )