Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CrossDomainMiddleware so that it returns proper allowed methods #947

Closed
acelaya opened this issue Dec 31, 2020 · 0 comments
Closed

Fix CrossDomainMiddleware so that it returns proper allowed methods #947

acelaya opened this issue Dec 31, 2020 · 0 comments
Labels
Milestone

Comments

@acelaya
Copy link
Member

acelaya commented Dec 31, 2020

The middleware tries to determine the allowed methods by using the RouteResult::class request attribute, but since the middleware is (and has to be) executed before the routing middleware, that attribute is always null.

When that happens, it falls back to "allow all" HTTP methods, which kind of works, but it's not correct.

It should, instead, try to match the route for the requested path, and infer the allowed methods from there.

@acelaya acelaya added the bug label Dec 31, 2020
@acelaya acelaya added this to the 2.5.1 milestone Jan 2, 2021
@acelaya acelaya modified the milestones: 2.5.1, 2.5.2 Jan 21, 2021
@acelaya acelaya closed this as completed Jan 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant