Open vitali-karmanov opened 4 months ago
The ASP.NET client sdk tools in Piranha is basically just middleware redirecting to ASP.NET, and then it's up to the rendering to do its magic any way it sees fit. In that sense it's strange that Piranha would disable any headers that should be outputted.
And issue #1899 is regarding adding custom options to the asp.net static file middleware that wasn't added by Piranha by default. This however seems to be more in regards to output compression of the generated HTML. Have you verified that the client is sending the correct Accept-Encoding
header to the server?
Hello everyone,
Following Microsoft's documentation to enable Brotli compression doesn't seem to work with Piranha CMS. The Content-Encoding header is missing in the response.
I wonder if this might be related to issue #1899.
Here is my Program.cs file.
var builder = WebApplication.CreateBuilder(args);
// Enable response compression builder.Services.AddResponseCompression(options => { options.EnableForHttps = true; });
builder.AddPiranha(options => { options.AddRazorRuntimeCompilation = true;
});
var app = builder.Build();
// Use response compression middleware app.UseResponseCompression();
app.UseRouting();
if (app.Environment.IsDevelopment()) { app.UseDeveloperExceptionPage(); }
app.UsePiranha(options => { // Initialize Piranha App.Init(options.Api);
});
app.Run();
Any guidance or suggestions to resolve this issue would be greatly appreciated.
Thank you!