Skip to content

Commit c913af6

Browse files
authored
Merge pull request #49 from Light-it-labs/fix/cors-setup
Fix CORS configuration
2 parents eeb43f3 + ec7ebe8 commit c913af6

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Backend
22
RUN_ENV=local
3-
BACKEND_CORS_ORIGINS=[http://localhost]
3+
BACKEND_CORS_ORIGINS=["http://localhost"]
44
PROJECT_NAME="fast-api-template"
55
SERVER_NAME=localhost
66
SERVER_HOST=http://localhost:8000/

app/core/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Settings(BaseSettings):
2121
SECRET_KEY: str = secrets.token_urlsafe(32)
2222
SERVER_NAME: str
2323
SERVER_HOST: AnyHttpUrl
24-
BACKEND_CORS_ORIGINS: Union[str, List[str]] = []
24+
BACKEND_CORS_ORIGINS: Union[List[str], str] = []
2525
PROJECT_NAME: str
2626
AUTHENTICATION_API_RATE_LIMIT: str = "5 per minute"
2727
SECURE_COOKIE: bool = True

0 commit comments

Comments
 (0)