Skip to content

[release/6.0-rc1] Update middleware that assumes UseRouting is called after them, for minimal hosting #35635

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

Merged
merged 14 commits into from
Aug 24, 2021

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Aug 23, 2021

Backport of #35426 to release/6.0-rc1

/cc @BrennanConroy

Customer Impact

When using the new "minimal hosting" (WebApplicationBuilder/WebApplication), UseRouting() is implicitly called for you which causes issues if you try to use one of the middleware that should run before UseRouting (middleware order). If you hit this scenario where you use one of these middleware without calling UseRouting it will silently not work. This fixes it so the middleware will work in the WebApplication case without the user calling UseRouting.

Testing

Lots of new tests for both new and old scenarios

Risk

Low, test coverage is good, manual testing done as well.

@Pilchie Pilchie added the Servicing-consider Shiproom approval is required for the issue label Aug 24, 2021
@ghost
Copy link

ghost commented Aug 24, 2021

Hello human! Please make sure you've included the Shiproom Template in a comment or (preferably) the PR description. Also, make sure this PR is not marked as a draft and is ready-to-merge.

@BrennanConroy BrennanConroy added Servicing-approved Shiproom has approved the issue and removed Servicing-consider Shiproom approval is required for the issue labels Aug 24, 2021
Copy link
Member

@BrennanConroy BrennanConroy left a comment

Choose a reason for hiding this comment

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

Wait for my approval

@BrennanConroy
Copy link
Member

@dotnet/aspnet-build merge please 😃

@wtgodbe wtgodbe merged commit d455df3 into release/6.0-rc1 Aug 24, 2021
@wtgodbe wtgodbe deleted the backport/pr-35426-to-release/6.0-rc1 branch August 24, 2021 19:53
@ghost ghost added this to the 6.0-rc1 milestone Aug 24, 2021
@amcasey amcasey added area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlewares and removed area-runtime labels Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlewares Servicing-approved Shiproom has approved the issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants