Skip to content

v1.10.0 — Browser-facing HTML error negotiation for Nene2\Demo

Choose a tag to compare

@hideyukiMORI hideyukiMORI released this 10 Jul 07:35
· 66 commits to main since this release
c5c1bb6

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 Accept header contains text/html, 4xx/5xx Problem Details are replaced by the page from the new stable contract DemoErrorPageRendererInterface. The bundled MinimalDemoErrorPageRenderer (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 and Retry-After are preserved, X-Robots-Tag: noindex is 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-wide default-src 'self' no longer strips the page's styling. The trap and a reference header for custom renderers are documented in the howto.
  • DemoRouteRegistrar accepts any PSR-15 RequestHandlerInterface — products can decorate StartDisposableDemoHandler (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 explicit throttleLimit are 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.

Full Changelog

v1.9.0...v1.10.0