From 2bea6859319b11abe18f55accb215bbffc592a96 Mon Sep 17 00:00:00 2001 From: El De-dog-lo <3859395+fubuloubu@users.noreply.github.com> Date: Tue, 28 Nov 2023 10:24:35 -0500 Subject: [PATCH] fix: use regex for cors with wildcard in it (#29) --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 4d197ee..3870d8c 100644 --- a/main.py +++ b/main.py @@ -63,8 +63,8 @@ async def swagger_ui_redirect(req: Request) -> HTMLResponse: "https://remix.ethereum.org", "https://remix-alpha.ethereum.org", "https://remix-beta.ethereum.org", - "https://deploy-preview-*--remixproject.netlify.app/", ], + allow_origin_regex="https://deploy-preview-[0-9]*--remixproject.netlify.app/", allow_credentials=True, allow_methods=["*"], allow_headers=["*"],