Switch code, scripts and docs to English; drop plan.md references

This commit is contained in:
tleininger committed 2026-09-21 15:25:01 +02:00
1 parent 76f1ad7825
commit c4c7ca2ee4
15 files changed
+532 -540

No files matched your search

+9 -10
View File
@@ -7,16 +7,16 @@ var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddRazorComponents();
// Inhalte werden beim Start einmalig eingelesen und gecacht -> Singleton.
builder.Services.AddSingleton<SeitenService>();
// Content is read once at startup and cached -> singleton.
builder.Services.AddSingleton<PageService>();
var app = builder.Build();
// NPM terminiert TLS und ist der einzige Weg zum Container (kein Port-Mapping
// im Produktivbetrieb, siehe plan.md AE-4). Ohne UseForwardedHeaders sieht die
// App jede Anfrage als HTTP und mit der Proxy-IP statt der Client-IP.
// KnownNetworks/KnownProxies bewusst geleert, weil ausschliesslich NPM den
// Container erreicht.
// NPM terminates TLS and is the only way to reach the container (no port
// mapping in production). Without UseForwardedHeaders the app sees every request
// as HTTP and with the proxy IP instead of the client IP.
// KnownNetworks/KnownProxies are deliberately empty because only NPM reaches
// the container.
app.UseForwardedHeaders(new ForwardedHeadersOptions
{
ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto,
@@ -28,9 +28,8 @@ app.UseForwardedHeaders(new ForwardedHeadersOptions
if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler("/Error", createScopeForErrors: true);
// Kein UseHsts() und kein UseHttpsRedirection(): NPM setzt HSTS und
// terminiert TLS. Beides hier wuerde hinter dem Proxy eine
// Redirect-Schleife erzeugen (plan.md AE-4).
// No UseHsts() and no UseHttpsRedirection(): NPM sets HSTS and terminates
// TLS. Both here would create a redirect loop behind the proxy.
}
app.UseStatusCodePagesWithReExecute("/not-found", createScopeForStatusCodePages: true);