davanstrien HF staff commited on
Commit
3b354b4
1 Parent(s): becbbb8

Update CORS origins in main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -41,7 +41,7 @@ VOTES_FILE = "votes/votes.jsonl"
41
  # Configure CORS
42
  origins = [
43
  "https://huggingface.co",
44
- "chrome-extension://your-plugin-id", # Replace with your Chrome plugin ID
45
  ]
46
 
47
 
@@ -92,7 +92,7 @@ async def receive_vote(
92
  response = JSONResponse(content={"message": "Vote submitted successfully"})
93
  response.headers[
94
  "Access-Control-Allow-Origin"
95
- ] = "chrome-extension://your-plugin-id" # Replace with your Chrome plugin ID
96
  response.headers["Access-Control-Allow-Methods"] = "POST"
97
  response.headers["Access-Control-Allow-Headers"] = "*"
98
  return response
 
41
  # Configure CORS
42
  origins = [
43
  "https://huggingface.co",
44
+ "chrome-extension://ogbhjlfpmjgjbjoiffagjogbhgaipopf", # Replace with your Chrome plugin ID
45
  ]
46
 
47
 
 
92
  response = JSONResponse(content={"message": "Vote submitted successfully"})
93
  response.headers[
94
  "Access-Control-Allow-Origin"
95
+ ] = "chrome-extension://ogbhjlfpmjgjbjoiffagjogbhgaipopf" # Replace with your Chrome plugin ID
96
  response.headers["Access-Control-Allow-Methods"] = "POST"
97
  response.headers["Access-Control-Allow-Headers"] = "*"
98
  return response