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 the CORSMethodMiddleware bug with subrouters #535

Merged
merged 1 commit into from Nov 17, 2019

Conversation

fharding1
Copy link
Contributor

Fixes #534

Summary of Changes

  1. Adds a test case for the repro given in issue [bug] CORSMethodMiddleware can add the allowed methods of the wrong routes #534
  2. Fixes the logic in CORSMethodMiddleware to handle matching routes better (now more closely mirrors the way routes are actually matched, just ignoring method mismatch errors)

@fharding1 fharding1 changed the title Fixes the CORSMethodMiddleware bug with SubRouters Fix the CORSMethodMiddleware bug with subrouters Nov 15, 2019
* Adds a test case for the repro given in issue gorilla#534
* Fixes the logic in CORSMethodMiddleware to handle matching routes
better
@elithrar
Copy link
Contributor

Ready to merge?

@elithrar elithrar self-requested a review November 17, 2019 01:18
@elithrar elithrar self-assigned this Nov 17, 2019
@elithrar elithrar added the bug label Nov 17, 2019
@fharding1
Copy link
Contributor Author

@elithrar yes

@elithrar elithrar merged commit 2854a05 into gorilla:master Nov 17, 2019
@elithrar
Copy link
Contributor

Thanks as always!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] CORSMethodMiddleware can add the allowed methods of the wrong routes
2 participants