mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 14:30:45 +00:00
docs: document WS broadcast scope gating and Control UI img-src CSP
This commit is contained in:
@@ -278,6 +278,18 @@ Trusted-proxy note:
|
||||
|
||||
See [Tailscale](/gateway/tailscale) for HTTPS setup guidance.
|
||||
|
||||
## Content Security Policy
|
||||
|
||||
The Control UI ships with a tight `img-src` policy: only **same-origin** assets and `data:` URLs are allowed. Remote `http(s)` and protocol-relative image URLs are rejected by the browser and do not issue network fetches.
|
||||
|
||||
What this means in practice:
|
||||
|
||||
- Avatars and images served under relative paths (for example `/avatars/<id>`) still render.
|
||||
- Inline `data:image/...` URLs still render (useful for in-protocol payloads).
|
||||
- Remote avatar URLs emitted by channel metadata are stripped at the Control UI's avatar helpers and replaced with the built-in logo/badge, so a compromised or malicious channel cannot force arbitrary remote image fetches from an operator browser.
|
||||
|
||||
You do not need to change anything to get this behavior — it is always on and not configurable.
|
||||
|
||||
## Building the UI
|
||||
|
||||
The Gateway serves static files from `dist/control-ui`. Build them with:
|
||||
|
||||
Reference in New Issue
Block a user