fix(web): allow image sources in CSP - #1672
Conversation
🦋 Changeset detectedLatest commit: 15d2674 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 15d2674750
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| } | ||
|
|
||
| const HSTS_VALUE = 'max-age=31536000'; | ||
| const CONTENT_SECURITY_POLICY = "default-src 'self'; img-src 'self' data: blob:"; |
There was a problem hiding this comment.
Allow blob media sources for video previews
On non-loopback binds this relaxes only img-src; media-src is still absent and therefore falls back to default-src 'self' (MDN), so blob: URLs remain blocked for <video>/<audio>. The web UI creates blob URLs for authenticated uploaded videos in AuthMedia.vue and for local video attachment previews in Composer.vue, so users viewing video attachments over the exposed server still get broken previews unless this policy also includes media-src 'self' data: blob:.
Useful? React with 👍 / 👎.
commit: |
Related Issue
Resolve #(issue_number)
Problem
What changed
Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.