[backend/middleware] Fix HTML error pages not working intermittently
This commit is contained in:
parent
3a346d5a22
commit
8071b5c6ea
1 changed files with 1 additions and 1 deletions
|
@ -166,7 +166,7 @@ public class ErrorHandlerMiddleware(
|
|||
{
|
||||
var model = new ErrorPageModel(payload);
|
||||
ctx.Response.ContentType = "text/html; charset=utf8";
|
||||
var stream = ctx.Response.Body;
|
||||
var stream = ctx.Response.BodyWriter.AsStream();
|
||||
await razor.RenderToStreamAsync("Shared/ErrorPage.cshtml", model, stream);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue