Serve index.html no-cache on every route; check the theme script's CSP hash
`try_files` served the SPA fallback inside `location /`, so `/` and every client route went out without `Cache-Control: no-cache`. The fallback is now the last argument, an internal redirect to the exact no-cache location. `src/csp.check.ts` recomputes the inline theme script's sha256 and fails `bun run check` with the new value when the CSP no longer names it.
This commit is contained in:
@@ -3,7 +3,8 @@
|
||||
#
|
||||
# script-src: the bundle, plus the theme script inline in index.html by its
|
||||
# hash. Edit that script and this hash must change with it (sha256 of the text
|
||||
# between the tags, base64), or the app paints light-then-dark again.
|
||||
# between the tags, base64), or the app paints light-then-dark again;
|
||||
# `bun run check` (src/csp.check.ts) fails with the new value.
|
||||
# style-src 'unsafe-inline': Monaco, Radix's scroll lock and the toasts insert
|
||||
# <style> elements at runtime, which no hash can name.
|
||||
# img/frame-src take any http(s): a camera stream or website widget points
|
||||
|
||||
Reference in New Issue
Block a user