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

Headers Passthrough #238

Closed
WiseGuru opened this issue Dec 11, 2023 · 1 comment
Closed

Headers Passthrough #238

WiseGuru opened this issue Dec 11, 2023 · 1 comment

Comments

@WiseGuru
Copy link

This is a site security issue; with Digital Gardens published as they are, there are no included security headers, and cross-site scripting is a real possibility.

As it is, sites like https://securityheaders.com and https://pentest-tools.com reveal the (admittedly low risk) lack of certain headers that would reduce the risk of phishing or XSS.

image

In Cloudflare, it's possible to manually add headers by modifying the .eleventy.js file to include eleventyConfig.addPassthroughCopy("src/site/_headers") and adding the file /src/site/_headers with the headers you want to add.

Vercel has some documentation regarding headers and adding them to projects, but I don't use Vercel, so I haven't gone through their process.

https://vercel.com/docs/edge-network/headers
https://vercel.com/docs/projects/project-configuration#headers

I'm not sure if there's a clean way to add headers easily to any deployment, but it would be great if the default option was secure.

As a side note, I wasn't able to get CSP to work, I believe due to the amount of on-page scripting, but I was able to get the other headers in place without causing any apparent conflicts.

image

I'm happy to help test or troubleshoot!

@WiseGuru
Copy link
Author

I should have RTFM; this page in your guide explains it. https://dg-docs.ole.dev/advanced/configure-build-pipeline/

Screenshot below of how the userSetup.js file needs to be modified to allow for header passthrough.

Headers Passthrough

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