From ec7ebe8111eb20feb0e33b0936d22bdc12a78bfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9fano=20Troncaro?= Date: Fri, 20 Feb 2026 14:48:39 -0300 Subject: [PATCH] fix: cors configuration --- .env.example | 2 +- app/core/config.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.example b/.env.example index 752d642..d4ed852 100644 --- a/.env.example +++ b/.env.example @@ -1,6 +1,6 @@ # Backend RUN_ENV=local -BACKEND_CORS_ORIGINS=[http://localhost] +BACKEND_CORS_ORIGINS=["http://localhost"] PROJECT_NAME="fast-api-template" SERVER_NAME=localhost SERVER_HOST=http://localhost:8000/ diff --git a/app/core/config.py b/app/core/config.py index e7d324f..1b9f510 100644 --- a/app/core/config.py +++ b/app/core/config.py @@ -21,7 +21,7 @@ class Settings(BaseSettings): SECRET_KEY: str = secrets.token_urlsafe(32) SERVER_NAME: str SERVER_HOST: AnyHttpUrl - BACKEND_CORS_ORIGINS: Union[str, List[str]] = [] + BACKEND_CORS_ORIGINS: Union[List[str], str] = [] PROJECT_NAME: str AUTHENTICATION_API_RATE_LIMIT: str = "5 per minute" SECURE_COOKIE: bool = True