Support for Headers
- Dominant language
- TypeScript
- Stars
- 49
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
Thanks for a very useful plugin!
Had a thought concerning this: https://github.com/google/strict-csp/blob/main/strict-csp/index.ts#L116
Perhaps headers could be supported as well. Maybe there could be some configuration setting whether to generate and inject the meta tag or perhaps just generate a file containing the hashes. The generated file could then be consumed elsewhere e.g. Server middleware in order to inject the hashes into a CSP.
Just a thought, that would side-step the problems raised in the link above (CSP not protecting before the meta tag + no support for report-only mode).
Thought I'd raise the topic for discussion, happy to submit a PR if in any interest. Feel free to resolve immediately if you feel there's no mileage in it.
Contributor guide
Assessment
This issue has not been assessed yet.