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 add_middleware enum comparison #1698

Merged
merged 3 commits into from
Apr 24, 2023
Merged

Conversation

RobbeSneyders
Copy link
Member

@RobbeSneyders RobbeSneyders commented Apr 24, 2023

Fixes #1697

Because of a wrong comparison against the position Enum, middleware was not actually being added to the stack via add_middleware. This PR fixes this, adds a warning when the middleware position cannot be found, and adds a test.

@RobbeSneyders RobbeSneyders added this to the Connexion 3.0 milestone Apr 24, 2023
Copy link
Member

@Ruwann Ruwann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot, @RobbeSneyders !

@coveralls
Copy link

Pull Request Test Coverage Report for Build 4788329443

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.4%) to 94.042%

Totals Coverage Status
Change from base Build 4774497315: 0.4%
Covered Lines: 3346
Relevant Lines: 3558

💛 - Coveralls

@RobbeSneyders RobbeSneyders merged commit 15fe2ed into main Apr 24, 2023
5 checks passed
@RobbeSneyders RobbeSneyders deleted the bugfix/add-middleware branch April 24, 2023 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failing to combine add_middleware with Starlette's CORSMiddleware
3 participants