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

Add option in SSG for outputting SRI hashes as JSON #67

Open
Bwc9876 opened this issue Mar 31, 2024 · 2 comments
Open

Add option in SSG for outputting SRI hashes as JSON #67

Bwc9876 opened this issue Mar 31, 2024 · 2 comments
Labels
enhancement New feature or request Fund sri SubResource Integrity ssg Related to Static Site Generation

Comments

@Bwc9876
Copy link

Bwc9876 commented Mar 31, 2024

Hey there, this project seems super handy!

One thing is that in an SSR context where the Astro output is being used by a framework written in another language (Django, Flask, Rocket, etc) it may be handy to have an option to output SRI hashes of a statically generated site to JSON instead of a JS module.

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@castarco
Copy link
Contributor

Hi @Bwc9876, that sounds like a good idea 😃. I have some doubts about your proposal, though.

How do you expect it to work? In my mind I have something quite simple, just having an exact equivalent of the "hashes module" but in JSON format.

So, if today we have sri.hashesModule, we would also have the option sri.hashesJson (or something similar, I'd have to think about its name).

@castarco castarco added enhancement New feature or request sri SubResource Integrity ssg Related to Static Site Generation labels Mar 31, 2024
@Bwc9876
Copy link
Author

Bwc9876 commented Apr 1, 2024

Yeah I was thinking the same thing, another option to specify a path to output the JSON to like sri.hashesJson would work.

@polar-sh polar-sh bot added the Fund label Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Fund sri SubResource Integrity ssg Related to Static Site Generation
Projects
None yet
Development

No branches or pull requests

2 participants