The Blazor Web App requires the ASP.NET runtime to function properly, as it uses interactive server components. Changed from nginx serving static files to running the full .NET application. Changes: - Updated Dockerfile to use aspnet:9.0 runtime image - Removed nginx configuration (no longer needed) - Disabled HTTPS redirection (running behind reverse proxy) - Added publish/ folder to .gitignore 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
28 lines
758 B
C#
28 lines
758 B
C#
using SilverLabs.Website.Components;
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
// Add services to the container.
|
|
builder.Services.AddRazorComponents()
|
|
.AddInteractiveServerComponents();
|
|
|
|
var app = builder.Build();
|
|
|
|
// Configure the HTTP request pipeline.
|
|
if (!app.Environment.IsDevelopment())
|
|
{
|
|
app.UseExceptionHandler("/Error", createScopeForErrors: true);
|
|
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
|
|
app.UseHsts();
|
|
}
|
|
|
|
// app.UseHttpsRedirection(); // Disabled - running behind reverse proxy
|
|
|
|
app.UseAntiforgery();
|
|
|
|
app.MapStaticAssets();
|
|
app.MapRazorComponents<App>()
|
|
.AddInteractiveServerRenderMode();
|
|
|
|
app.Run();
|