google/eleventy-high-performance-blog

CSP Headers Injection to non-standard _headers; htaccess instead.

inetbiz opened this issue · 1 comments

https://github.com/google/eleventy-high-performance-blog/blob/main/_11ty/apply-csp.js#L71
const headersPath = "./_site/_headers";
This forces Netlify use. I'd rather use a modified DOM or SED to .htaccess in the appropriate section comment line append below or replace with a tool like SED. Move the original to a feature branch like discussed on Twitter with @cramforce

Have a question: If I change _headers to .htaccess.njk; add the necessary front-matter permalink, is https://github.com/google/eleventy-high-performance-blog/blob/main/.eleventy.js#L215 necessary? Seems like I'd not get what I wanted. It would export the njk file, instead. Remove if I'm modifying this? I have it working. That step just seemed not right.