Hero: grote foto's in de achtergrond robuust en sneller, voortgang en opnieuw proberen; admin zonder inline script

- Een decode voor de hele set, per breedte eenmaal geschaald voor WebP en AVIF (6000x4000: 21,1 s -> 6,4 s per set)
- Eigen limiet per set (Media:RenderSetTimeoutSeconds 600), harde limiet rond een foto, de renderer stopt nooit door een uitzondering, een mislukte foto wacht tot de volgende ronde en houdt de rij niet op
- Logging per foto (start, per variant, einde, fout); voortgang per variant in de admin; nieuwe uitsnede na focuswijziging zichtbaar (oude afbeelding blijft, shimmer); knop Opnieuw proberen
- Thema-script als /theme-init.js (CSP script-src 'self'), test en smoke-controle op inline scripts

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-16 22:23:15 +01:00
co-authored by Claude Sonnet 5.5
parent 9d647bb049
commit 1b542dee98
22 changed files with 567 additions and 54 deletions
+7
View File
@@ -57,6 +57,13 @@ if [ "$hero" = "200" ] || [ "$hero" = "204" ]; then pass "public hero (/api/v1/h
expect_status /api/v1/hero/all 401 "the hero management read is protected"
expect_status /media/hero/0123456789abcdef/wide-960.webp 404 "media that is not stored is a plain 404"
# The admin page must have no inline script: the host only allows scripts from its own origin (script-src 'self').
admin_html="$(curl_get "$base/admin/" || true)"
if printf '%s' "$admin_html" | grep -q 'id="root"'; then
if printf '%s' "$admin_html" | grep -qiP '<script(?![^>]*src=)[^>]*>'; then fail "the admin page has an inline script (blocked by the Content-Security-Policy)"; else pass "the admin page has no inline script"; fi
expect_status /admin/theme-init.js 200 "the theme script is a file of its own"
fi
# A test host is never indexed.
expect_header / X-Robots-Tag noindex "noindex on the website"
expect_body /robots.txt "Disallow: /" "robots.txt disallows everything"