docs: sandbox media-src for audio-capable plugins (radio)

This commit is contained in:
Jean Chevronnet 2026-07-07 14:19:59 +00:00
parent dd9315c539
commit 40ad555b36
No known key found for this signature in database

View file

@ -82,10 +82,15 @@ touch the app.
```
location = /app/plugin-sandbox.html {
add_header Content-Security-Policy "default-src 'none'; script-src 'unsafe-inline' 'unsafe-eval'; style-src 'unsafe-inline'; img-src data:; connect-src 'none'; frame-ancestors 'self'" always;
add_header Content-Security-Policy "default-src 'none'; script-src 'unsafe-inline' 'unsafe-eval'; style-src 'unsafe-inline'; img-src data:; media-src https:; connect-src 'none'; frame-ancestors 'self'" always;
}
```
`media-src https:` lets a sandboxed plugin play an audio/video stream in its own
iframe (e.g. the `orbit-radio` footer player). Playback stays contained — the
iframe still can't `fetch`, read the response, or reach the app. Drop it if no
deployment plugin needs media.
Applied live in `csp-app.conf` / `chat-headers.conf` (added `'self'` to `frame-src`)
and a `location = /app/plugin-sandbox.html` block in `tchatou-app-backend.conf`.
Note: nginx *reload* cannot rekey a shared-memory zone, so activating this needed a