From 152286eb9287e6e01b2f7c9eaf2d357ba5ac314f Mon Sep 17 00:00:00 2001 From: Dave Date: Sat, 31 May 2025 14:11:42 +0100 Subject: [PATCH] allow all origins for cors --- app/core/config.py | 2 +- main.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/core/config.py b/app/core/config.py index a2eecf8..f7fb44e 100644 --- a/app/core/config.py +++ b/app/core/config.py @@ -8,7 +8,7 @@ class Settings(BaseSettings): VERSION: str = "0.1.0" # CORS Configuration - BACKEND_CORS_ORIGINS: list[str | AnyHttpUrl] = [] + BACKEND_CORS_ORIGINS: list[str | AnyHttpUrl] = ['*'] @validator("BACKEND_CORS_ORIGINS", pre=True) def assemble_cors_origins(self, v: str | list[str]) -> list[str] | str: diff --git a/main.py b/main.py index 641b011..6a861e6 100644 --- a/main.py +++ b/main.py @@ -62,7 +62,6 @@ if settings.BACKEND_CORS_ORIGINS: app.add_middleware( CORSMiddleware, allow_origins=[str(origin) for origin in settings.BACKEND_CORS_ORIGINS], - allow_credentials=True, allow_methods=["*"], allow_headers=["*"], )