diff --git a/Server/src/SOR.Admin/Program.cs b/Server/src/SOR.Admin/Program.cs index e1f78f7..de4f3e9 100644 --- a/Server/src/SOR.Admin/Program.cs +++ b/Server/src/SOR.Admin/Program.cs @@ -192,6 +192,12 @@ app.UseAuthentication(); app.UseAuthorization(); app.UseAntiforgery(); +// ── Health check ─────────────────────────────────────────────────────────── +// Must be AllowAnonymous — k8s liveness/readiness probes hit this before any +// session exists. Without it the fallback policy triggers an OIDC challenge, +// which fails and returns 500, causing the probe to kill the pod in a loop. +app.MapGet("/health", () => Results.Ok()).AllowAnonymous(); + // ── Auth endpoints ───────────────────────────────────────────────────────── // Challenge: cookie auth redirects here when a request is unauthenticated.