// Fills the inline-script hashes into dist/_headers after a build. // // The Content-Security-Policy in public/_headers allows no 'unsafe-inline' // for scripts. The inline scripts the site does carry (the theme and page // iris bootstraps in Base.astro) are allowed by SHA-256 hash instead, which a // browser accepts only for the exact text. Astro rewrites them on every // build, so the hashes are computed from the built HTML rather than written // by hand. // // Which scripts get a hash // ------------------------ // Not "whatever is in dist". Most pages here render Markdown, three whole // collections of it are mirrored from other people's repositories, and // Markdown can carry raw HTML. Hashing every inline script found in the // output would mean a `