Skip to content

Commit 2212ce9

Browse files
committed
strip for CORS origins
new behavior adds trailing `/` to end of links without a path: pydantic/pydantic#7186 (comment)
1 parent 8c56128 commit 2212ce9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backend/app/app/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ async def shutdown_event():
3434
if settings.BACKEND_CORS_ORIGINS:
3535
app.add_middleware(
3636
CORSMiddleware,
37-
allow_origins=[str(origin) for origin in settings.BACKEND_CORS_ORIGINS],
37+
allow_origins=[str(origin).rstrip("/") for origin in settings.BACKEND_CORS_ORIGINS],
3838
allow_credentials=True,
3939
allow_methods=["*"],
4040
allow_headers=["*"],

0 commit comments

Comments
 (0)