chore(docs): add Content-Security-Policy headers
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 115
- Forks
- 12
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 36
Description
The docs site currently has no CSP headers. The portal has a comprehensive CSP in its .ic-assets.json — we should add one for the docs site too.
Directives to account for:
script-src:'self','unsafe-inline'(Starlight head scripts), Matomo domainsconnect-src:'self'(Pagefind), Matomo domainsstyle-src:'self','unsafe-inline'(Starlight inline styles)font-src:'self'(CircularXX)img-src:'self',data:default-src:'self'object-src:'none'base-uri:'self'frame-ancestors:'none'form-action:'self'upgrade-insecure-requests
Reference: portal's CSP in static/.ic-assets.json
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the portal CSP in static/.ic-assets.json with the docs site's configuration and identify where response headers are defined. Add the listed directives for Starlight, Pagefind, Matomo, fonts, images, and framing, then verify the docs site serves the expected Content-Security-Policy header without blocking its documented features.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation, security
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100