6deb8dd4c8
Uses GetApplicationVersion(Assembly.GetExecutingAssembly()) — the same timestamp-based version already logged at startup and baked into the assembly via the csproj <Version> property. Removes the minimal-API /version endpoint from web/Program.cs and reverts the web Dockerfile APP_VERSION build-arg (no longer needed). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
24 lines
518 B
C#
24 lines
518 B
C#
// Program.cs
|
|
using Web.Middleware;
|
|
using Web.Settings;
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
builder.Services.AddRouting();
|
|
builder.Services.Configure<SiteSettings>(builder.Configuration.GetSection(SiteSettings.SectionName));
|
|
|
|
builder.Services.AddReverseProxy()
|
|
.LoadFromConfig(builder.Configuration.GetSection("ReverseProxy"));
|
|
|
|
var app = builder.Build();
|
|
|
|
app.UseMiddleware<SiteModeMiddleware>();
|
|
|
|
// Static site
|
|
app.UseDefaultFiles();
|
|
app.UseStaticFiles();
|
|
|
|
app.MapReverseProxy();
|
|
|
|
app.Run();
|