Files
Website/BlazorApp/Program.cs
SysAdmin 62dc7bd93f fix: Change Dockerfile to run ASP.NET Core instead of static nginx
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>
2025-10-20 19:28:01 +01:00

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