caddy: serve /img/* from the homepage root
The @data path allowlist on the post-auth listener did not include /img/*, so docs screenshots fell through to the index.html catch-all and the browser got 200 text/html for every PNG (docs images broken live 2026-10-08). Pinned by the homepage_caddy seam.
This commit is contained in:
1 parent
cee90eea52
commit
4b71c014e9
2 files changed
+4
-1
No files matched your search
+1
-1
@@ -337,7 +337,7 @@ http://:8017 {
|
|||||||
try_files /docs.html
|
try_files /docs.html
|
||||||
file_server
|
file_server
|
||||||
}
|
}
|
||||||
@data path /services.json /status.json /app.js /style.css /deployed.js
|
@data path /services.json /status.json /app.js /style.css /deployed.js /img/*
|
||||||
handle @data {
|
handle @data {
|
||||||
file_server
|
file_server
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,9 @@ setup() {
|
|||||||
# can access them (the browser's Authentik session covers these fetches).
|
# can access them (the browser's Authentik session covers these fetches).
|
||||||
grep -qE "@data[[:space:]]+path[[:space:]]+/services\.json[[:space:]]+/status\.json" "$CADDY"
|
grep -qE "@data[[:space:]]+path[[:space:]]+/services\.json[[:space:]]+/status\.json" "$CADDY"
|
||||||
grep -qE "handle[[:space:]]+@data" "$CADDY"
|
grep -qE "handle[[:space:]]+@data" "$CADDY"
|
||||||
|
# docs screenshots (/img/*) must be served from disk, not answered by the
|
||||||
|
# index.html catch-all (2026-10-08: PNGs came back as 200 text/html).
|
||||||
|
grep -qE "@data[[:space:]]+path.*(/img/\*|/img/\*\")" "$CADDY"
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "the homepage revalidates its assets (no stale cache after deploys)" {
|
@test "the homepage revalidates its assets (no stale cache after deploys)" {
|
||||||
|
|||||||
Reference in new issue
Block a user