From 9b28a60f8b2349f96f8dbbfc8b2d42d86f614459 Mon Sep 17 00:00:00 2001 From: justinbaer Date: Fri, 9 May 2025 14:34:08 +0200 Subject: [PATCH] allow_origins_regex type changed from array to singular string --- gen/openapi_server/__main__.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/gen/openapi_server/__main__.py b/gen/openapi_server/__main__.py index 2cbf68b..07ee72a 100644 --- a/gen/openapi_server/__main__.py +++ b/gen/openapi_server/__main__.py @@ -19,11 +19,7 @@ app = connexion.FlaskApp(__name__, specification_dir='./openapi/') app.add_middleware( CORSMiddleware, position=MiddlewarePosition.BEFORE_EXCEPTION, - allow_origins_regex=[ - "^https://[a-zA-Z0-9.-]+\\.kanzleiapp\\.io$", - "^https://[a-zA-Z0-9.-]+\\.masasana\\.ai$", - "^http://localhost:4200$" - ], + allow_origins_regex=r"^(https?://)(.*kanzleiapp\.io|.*masasana\.ai|localhost:4200)$", allow_credentials=True, allow_methods=["*"], allow_headers=["*"],