You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having some trouble understanding how to use the CSP generation feature of this project with a statically generated website. I believe the docs only specify how to use them for an SSR website where you can inject the headers via a server middleware, which is not present for statically generated websites.
I looked through the dist folder to see if the CSP values were output anywhere.
Is there a way to save the generated CSP as an output of the build step or a generated file that I can reference when I deploy my static site to a CDN?
Thanks!
The text was updated successfully, but these errors were encountered:
Astro-Shield does not provide this feature yet, but we have it in our roadmap. The way to do it today is not too complicated, though, although it requires some extra scripting:
Run the build process, and generate the "hashes module" (you can wee how in the documentation)
After the build, you can run a script that loads the "hashes module", and based on its content changes the configuration for your provider of choice (Vercel, Netlify, etc.)
Hello,
I'm having some trouble understanding how to use the CSP generation feature of this project with a statically generated website. I believe the docs only specify how to use them for an SSR website where you can inject the headers via a server middleware, which is not present for statically generated websites.
I looked through the dist folder to see if the CSP values were output anywhere.
Is there a way to save the generated CSP as an output of the build step or a generated file that I can reference when I deploy my static site to a CDN?
Thanks!
The text was updated successfully, but these errors were encountered: