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

Merged
merged 1 commit into from Nov 17, 2019

Conversation

fharding1
Copy link
Member

@fharding1 fharding1 commented Nov 14, 2019

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
Member

elithrar commented Nov 17, 2019

Ready to merge?

@elithrar elithrar self-requested a review Nov 17, 2019
@elithrar elithrar self-assigned this Nov 17, 2019
@elithrar elithrar added the bug label Nov 17, 2019
@fharding1
Copy link
Member Author

fharding1 commented Nov 17, 2019

@elithrar yes

@elithrar elithrar merged commit 2854a05 into gorilla:master Nov 17, 2019
1 check passed
@elithrar
Copy link
Member

elithrar commented Nov 17, 2019

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.

2 participants