davanstrien HF staff commited on
Commit
f0a144e
1 Parent(s): c616690

Update CORS settings in main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -5
main.py CHANGED
@@ -65,17 +65,15 @@ async def lifespan(app: FastAPI):
65
  app = FastAPI() # )lifespan=lifespan)
66
  # Configure CORS
67
  origins = [
68
- "https://huggingface.co",
69
- "chrome-extension://deckahggoiaphiebdipfbiinmaihfpbk", # Replace with your Chrome plugin ID
70
  ]
71
 
72
 
73
  # Configure CORS settings
74
  app.add_middleware(
75
  CORSMiddleware,
76
- allow_origins=[
77
- "https://huggingface.co/datasets/*"
78
- ], # Update with your frontend URL
79
  allow_credentials=True,
80
  allow_methods=["*"],
81
  allow_headers=["*"],
 
65
  app = FastAPI() # )lifespan=lifespan)
66
  # Configure CORS
67
  origins = [
68
+ "https://huggingface.co/*",
69
+ # "chrome-extension://deckahggoiaphiebdipfbiinmaihfpbk", # Replace with your Chrome plugin ID
70
  ]
71
 
72
 
73
  # Configure CORS settings
74
  app.add_middleware(
75
  CORSMiddleware,
76
+ allow_origins=["https://huggingface.co/*"], # Update with your frontend URL
 
 
77
  allow_credentials=True,
78
  allow_methods=["*"],
79
  allow_headers=["*"],