Skip to content

Commit

Permalink
Add an allow rule for CORS from observable
Browse files Browse the repository at this point in the history
  • Loading branch information
hellais committed Jan 24, 2025
1 parent 2c33d2b commit 6f6fd7a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ async def lifespan(app: FastAPI):

app.add_middleware(
CORSMiddleware,
allow_origin_regex="^https://[-A-Za-z0-9]+(\.test)?\.ooni\.(org|io)$",
# allow from observable notebooks
allow_origin_regex="^https://[-A-Za-z0-9]+(\.test)?\.ooni\.(org|io)$|^https://.*\.observableusercontent\.com$",
#allow_origin_regex="^https://[-A-Za-z0-9]+(\.test)?\.ooni\.(org|io)$",
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
Expand Down

0 comments on commit 6f6fd7a

Please sign in to comment.