Repository navigation
v1.10.0 — Browser-facing HTML error negotiation for Nene2\Demo
What's New
Backward-compatible minor release: the disposable-demo module Nene2\Demo now answers browser visitors with a humane HTML error page instead of raw RFC 9457 JSON (ADR 0018).
- HTML error negotiation by default — when a demo-start request's
Acceptheader containstext/html, 4xx/5xx Problem Details are replaced by the page from the new stable contractDemoErrorPageRendererInterface. The bundledMinimalDemoErrorPageRenderer(minimal, unbranded, English) works out of the box; products override it for their own copy, language, and brand. Transport invariants are enforced by the handler regardless of renderer: original status andRetry-Afterare preserved,X-Robots-Tag: noindexis added, and API clients plus successful responses stay byte-for-byte unchanged. - CSP-safe out of the box — the bundled page carries its own per-page
Content-Security-Policy(default-src 'none'; style-src 'unsafe-inline'; ...), so the consuming app's app-widedefault-src 'self'no longer strips the page's styling. The trap and a reference header for custom renderers are documented in the howto. DemoRouteRegistraraccepts any PSR-15RequestHandlerInterface— products can decorateStartDisposableDemoHandler(logging, extra gates, response post-processing) without re-implementing the registrar. Existing call sites are unaffected.- Per-IP throttle default raised 10 → 30 starts/hour (
CountingDemoCapacityGuard) — one-shot re-click demos plus office/carrier NAT starved legitimate use at 10/h in production. Consumers pinning an explicitthrottleLimitare unaffected. - Docs: new ADR 0018, updated ADR 0009 stable surface, howto
add-disposable-demo.md(+ ja/fr/de/zh/pt-br translations).
See CHANGELOG.md ([1.10.0]) for full details. Issue #1536, PRs #1537 / #1538.