Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
inetbiz opened this issue Nov 13, 2021 · 1 comment
Open

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

inetbiz opened this issue Nov 13, 2021 · 1 comment

Comments

@inetbiz
Copy link

inetbiz commented Nov 13, 2021

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

@inetbiz
Copy link
Author

inetbiz commented Nov 13, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant