Beschikbaarheidspoort laat publieke site-endpoints door en 429 geeft Retry-After met ProblemDetails

Nieuwe marker [PublicSiteEndpoint] (deny-by-default): alleen GET /offerings blijft bereikbaar als het CMS uit staat of in onderhoud is; alle andere acties, adminroutes inbegrepen, blijven 503. OnRejected zet Retry-After en schrijft application/problem+json met alleen type, title en status. Op master zijn de limiet-policies nog globale buckets: de contactroutes mogen pas live na de per-client-partitionering van de ASF-branch.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-10 13:07:18 +01:00
co-authored by Claude Sonnet 5.5
parent c3c8bcfd5e
commit a58374abeb
12 changed files with 510 additions and 10 deletions
@@ -102,5 +102,15 @@ public class PipelineTests : IClassFixture<ApiWebApplicationFactory>
// request instead, which would otherwise mask a rate limiter that silently stopped
// engaging).
last!.StatusCode.Should().Be(HttpStatusCode.TooManyRequests);
// The rejection tells the client when to retry and carries a machine-readable body with
// only the standard fields (nothing about the limiter, the policy or the caller).
last.Headers.TryGetValues("Retry-After", out var retryAfter).Should().BeTrue();
int.Parse(retryAfter!.Single()).Should().BeGreaterThanOrEqualTo(1);
last.Content.Headers.ContentType?.MediaType.Should().Be("application/problem+json");
var body = await last.Content.ReadAsStringAsync();
using var json = System.Text.Json.JsonDocument.Parse(body);
json.RootElement.EnumerateObject().Select(p => p.Name).Should().BeEquivalentTo(["type", "title", "status"]);
json.RootElement.GetProperty("status").GetInt32().Should().Be(429);
}
}