From 492061e043253f9a71c90987b3c9a7030b35cc68 Mon Sep 17 00:00:00 2001 From: henrik Date: Wed, 13 Nov 2024 19:17:37 +0100 Subject: [PATCH] feat: Added output caching --- Pushy/Pushy/Program.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Pushy/Pushy/Program.cs b/Pushy/Pushy/Program.cs index 4d186f4..06f210c 100644 --- a/Pushy/Pushy/Program.cs +++ b/Pushy/Pushy/Program.cs @@ -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();