mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29:06 +00:00
server: allow CORS credentials
This commit is contained in:
@@ -46,6 +46,7 @@ else:
|
||||
app = FastAPI(lifespan=lifespan)
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_credentials=settings.CORS_ALLOW_CREDENTIALS or False,
|
||||
allow_origins=settings.CORS_ORIGIN.split(","),
|
||||
allow_methods=["*"],
|
||||
allow_headers=["*"],
|
||||
|
||||
@@ -8,6 +8,7 @@ class Settings(BaseSettings):
|
||||
|
||||
# CORS
|
||||
CORS_ORIGIN: str = "*"
|
||||
CORS_ALLOW_CREDENTIALS: bool = False
|
||||
|
||||
# Database
|
||||
DATABASE_URL: str = "sqlite:///./reflector.sqlite3"
|
||||
|
||||
Reference in New Issue
Block a user