Fix CORS_ORIGINS env parsing crash (pydantic-settings NoDecode), bump 0.1.1
list[str] settings fed from env were JSON-decoded by pydantic-settings before the field validator ran, so a plain string like CORS_ORIGINS=http://host:5009 raised JSONDecodeError on startup. Annotate list env fields with NoDecode and parse CSV/JSON in the validator. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
21f2852259
commit
7775128c07
+1
-1
@@ -31,7 +31,7 @@ async def lifespan(app: FastAPI):
|
||||
yield
|
||||
|
||||
|
||||
app = FastAPI(title="StackPilot", version="0.1.0", lifespan=lifespan)
|
||||
app = FastAPI(title="StackPilot", version="0.1.1", lifespan=lifespan)
|
||||
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
|
||||
Reference in New Issue
Block a user