From 92536420f825b421bcba899d1892e5b877305d59 Mon Sep 17 00:00:00 2001 From: "railway-app[bot]" <68434857+railway-app[bot]@users.noreply.github.com> Date: Wed, 6 May 2026 08:52:12 +0000 Subject: [PATCH] fix: expand CORS_METHODS wildcard to explicit HTTP methods in settings.py --- app/config/settings.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/config/settings.py b/app/config/settings.py index 737c3ff..6376cb7 100644 --- a/app/config/settings.py +++ b/app/config/settings.py @@ -40,10 +40,14 @@ def cors_origins_list(self) -> list[str]: @property def cors_methods_list(self) -> list[str]: + if self.CORS_METHODS.strip() == "*": + return ["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS", "HEAD", "TRACE", "CONNECT"] return [method.strip() for method in self.CORS_METHODS.split(",")] @property def cors_headers_list(self) -> list[str]: + if self.CORS_HEADERS.strip() == "*": + return ["*"] return [header.strip() for header in self.CORS_HEADERS.split(",")] # API