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

Add response compression #362

Open
raix opened this issue Mar 4, 2024 · 0 comments
Open

Add response compression #362

raix opened this issue Mar 4, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@raix
Copy link
Contributor

raix commented Mar 4, 2024

One of the Lighthouse findings are lack of compression, we should apply compression on the WebApp Middleware pipeline
(related to serving static files via the .NET application)

Image

Reference:

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddResponseCompression(options =>
{
    options.EnableForHttps = true;
});

var app = builder.Build();

app.UseResponseCompression();

app.MapGet("/", () => "Hello World!");

app.Run();
@tjementum tjementum added the enhancement New feature or request label Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 🔖 Ready
Development

No branches or pull requests

2 participants