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

Update middleware that assumes UseRouting is called after them, for minimal hosting #35426

Merged
merged 14 commits into from Aug 24, 2021

Conversation

BrennanConroy
Copy link
Member

Replaces #34991
Fixes #34146

This is just the ExceptionHandlerMiddleware for now. Getting the PR out for early feedback. Still needs at least 5 more tests and need to look at the Rewrite and StatusCode middleware as well.

@BrennanConroy
Copy link
Member Author

/backport to release/6.0-rc1

@github-actions
Copy link
Contributor

Started backporting to release/6.0-rc1: https://github.com/dotnet/aspnetcore/actions/runs/1160475626

BrennanConroy and others added 2 commits August 23, 2021 18:29
Co-authored-by: Stephen Halter <halter73@gmail.com>

// start a new middleware pipeline
var builder = app.New();
builder.UseMiddleware<RewriteMiddleware>(options);
Copy link
Member

@davidfowl davidfowl Aug 24, 2021

Choose a reason for hiding this comment

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

Suggested change
builder.UseMiddleware<RewriteMiddleware>(options);

This doesn't look right, why do we need to re-run the rewrite middleware on the new pipeline? Is this leftover?

@BrennanConroy BrennanConroy enabled auto-merge (squash) August 24, 2021 15:32
@BrennanConroy BrennanConroy merged commit f6452bf into main Aug 24, 2021
@BrennanConroy BrennanConroy deleted the brecon/useroutingmiddleware branch August 24, 2021 19:42
@ghost ghost added this to the 7.0-preview1 milestone Aug 24, 2021
@amcasey amcasey added area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlesware 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 middlesware
Projects
None yet
6 participants