Art post-audit polish (Codex): image HEAD, texture immutable cache, lightbox a11y, spacing

- /api/art/image/{id} now answers HEAD as well as GET (was 404 on HEAD) — mirrors the
  /a/{id} fix. Added tests/test_art_api.py (GET+HEAD+size=full fallback + today payload).
- /textures/* served immutable (long cache) instead of no-cache; excluded from the
  revalidate matcher. Live Caddyfile + repo snapshot both updated.
- Lightbox: Escape closes it, and focus moves to it on open (keyboard-friendly).
- Trimmed the gallery's top padding so "Daily Art" sits closer to the bar.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
jay
2026-06-21 18:17:30 -04:00
parent 39c666b4ee
commit dd8706e2fc
4 changed files with 64 additions and 3 deletions
+6
View File
@@ -62,6 +62,11 @@ upbeatbytes.com {
header @immutable Cache-Control "public, max-age=31536000, immutable"
# Static texture assets (frame wood grain, etc.) — large and unchanging. Cache
# them forever like immutable assets; rename the file if the texture ever changes.
@textures path /textures/*
header @textures Cache-Control "public, max-age=31536000, immutable"
# The SPA shell: "/" and extensionless client routes (try_files → index.html).
# Briefly cacheable at the CDN edge (s-maxage) so a first paint never depends
# on this origin's uplink; browsers still revalidate every visit (max-age=0).
# A deploy propagates within ≤2min and old immutable chunks are kept for a
@@ -80,6 +85,7 @@ upbeatbytes.com {
@revalidate {
not path /_app/immutable/*
not path /textures/*
path *.*
}
header @revalidate Cache-Control "no-cache"