Compare commits

..

2 Commits

Author SHA1 Message Date
henrik
492061e043 feat: Added output caching 2024-11-13 19:17:37 +01:00
henrik
5fa0de102d fix: Updated dockerfile version 2024-11-13 17:48:02 +01:00
2 changed files with 9 additions and 2 deletions

View File

@@ -1,9 +1,9 @@
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
USER $APP_UID
WORKDIR /app
EXPOSE 8080
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["Pushy/Pushy/Pushy.csproj", "Pushy/Pushy/"]

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();