feat: Added output caching

This commit is contained in:
henrik
2024-11-13 19:17:37 +01:00
parent 5fa0de102d
commit 492061e043

View File

@@ -28,6 +28,9 @@ builder.Services.AddRazorComponents()
.AddInteractiveServerComponents()
.AddInteractiveWebAssemblyComponents();
builder.Services.AddOutputCache();
builder.Services.AddResponseCompression();
var app = builder.Build();
// Configure the HTTP request pipeline.
@@ -39,9 +42,13 @@ else
{
app.UseExceptionHandler("/Error", createScopeForErrors: true);
app.UseHsts();
app.UseOutputCache();
}
app.UseHttpsRedirection();
app.UseResponseCompression();
app.UseStaticFiles();
app.UseAntiforgery();