Skip to content

Commit

Permalink
strip for CORS origins
Browse files Browse the repository at this point in the history
new behavior adds trailing `/` to end of links without a path:

pydantic/pydantic#7186 (comment)
  • Loading branch information
swelborn committed Oct 31, 2023
1 parent 8c56128 commit 2212ce9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/app/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ async def shutdown_event():
if settings.BACKEND_CORS_ORIGINS:
app.add_middleware(
CORSMiddleware,
allow_origins=[str(origin) for origin in settings.BACKEND_CORS_ORIGINS],
allow_origins=[str(origin).rstrip("/") for origin in settings.BACKEND_CORS_ORIGINS],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
Expand Down

0 comments on commit 2212ce9

Please sign in to comment.