From 41a16c8c17baffe1e5e34538e1fe92170cd92365 Mon Sep 17 00:00:00 2001 From: Felippe Costa Date: Tue, 17 Feb 2026 22:02:40 -0300 Subject: [PATCH] fix: allow Vercel preview deployments in CORS origins --- app/main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/main.py b/app/main.py index 85cabe5..df96286 100644 --- a/app/main.py +++ b/app/main.py @@ -109,12 +109,14 @@ def render(self, content: Any) -> bytes: # CORS configuration cors_origins = ["https://signedshot.io", "https://www.signedshot.io"] +cors_origin_regex = r"https://signedshot-site.*\.vercel\.app" if settings.debug: cors_origins.append("http://localhost:3000") app.add_middleware( CORSMiddleware, allow_origins=cors_origins, + allow_origin_regex=cors_origin_regex, allow_methods=["*"], allow_headers=["*"], )