-
Notifications
You must be signed in to change notification settings - Fork 48
Closed
Description
Note: This may or may not be specific to ASP.NET Core.
Currently, if middleware upstream sets the Content-Length header (i.e. StaticFiles), then usage of WebMarkupMin results in a 200, but no content. This is because the resulting content-size is no longer the same as reported by the header-value. My current resolution is to insert my own middleware to remove the header:
app.UseWebMarkupMin();
app.Use(async (context, next) =>
{
await next();
if (context.Response.Headers.ContainsKey("Content-Length"))
{
context.Response.Headers.Remove("Content-Length");
}
});
app.UseStaticFiles();A bit more info. is posted here.
Metadata
Metadata
Assignees
Labels
No labels