CORS Middleware: trim trailing space in allowed_origins #2735
Unanswered
sultaniman
asked this question in
Potential Issue
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey all,
At the moment the middleware is unable to match origin if the given origins contains trailing slash.
When the browser sends the
Origin
header theCORSMiddleware.is_allowed_origin
is not able to match ithttps://github.com/encode/starlette/blob/master/starlette/middleware/cors.py#L95-L102
I know it is a half measure but still wondering if we need to trim trailing slash from
allowed_origins
?Beta Was this translation helpful? Give feedback.
All reactions