Spaces:
Paused
Paused
Commit
•
3b354b4
1
Parent(s):
becbbb8
Update CORS origins in main.py
Browse files
main.py
CHANGED
@@ -41,7 +41,7 @@ VOTES_FILE = "votes/votes.jsonl"
|
|
41 |
# Configure CORS
|
42 |
origins = [
|
43 |
"https://huggingface.co",
|
44 |
-
"chrome-extension://
|
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://
|
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
|