openclaw - 💡(How to fix) Fix Control UI tweakcn theme import fails via Tailscale Serve due to CSP/connect-src [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#81516Fetched 2026-05-14 03:31:20
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
2
Author
Timeline (top)
closed ×1commented ×1mentioned ×1subscribed ×1

The Control UI tweakcn theme importer can fail with a generic browser error when the Control UI is accessed through a Tailscale Serve HTTPS hostname, even though the same import works when the Control UI is opened directly on loopback.

The error shown in the UI is:

NetworkError when attempting to fetch resource.

Error Message

  • Accessing Control UI directly at http://127.0.0.1:18789:
    • importing a tweakcn theme works.
  • Accessing the same Control UI through a custom Tailscale Serve HTTPS hostname:
    • importing the same theme fails with NetworkError when attempting to fetch resource.

Root Cause

The Control UI tweakcn theme importer can fail with a generic browser error when the Control UI is accessed through a Tailscale Serve HTTPS hostname, even though the same import works when the Control UI is opened directly on loopback.

The error shown in the UI is:

NetworkError when attempting to fetch resource.

Code Example

NetworkError when attempting to fetch resource.

---

https://tweakcn.com/editor/theme?theme=caffeine
https://tweakcn.com/r/themes/caffeine
caffeine

---

content-type: application/json
access-control-allow-origin: *

---

Content-Security-Policy: default-src 'self'; base-uri 'none'; object-src 'none'; frame-ancestors 'none'; script-src 'self'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' data: blob:; font-src 'self' https://fonts.gstatic.com; worker-src 'self'; connect-src 'self' ws: wss: https://api.openai.com

---

https://tweakcn.com/r/themes/<id>

---

connect-src 'self' ws: wss: https://api.openai.com https://tweakcn.com
RAW_BUFFERClick to expand / collapse

Summary

The Control UI tweakcn theme importer can fail with a generic browser error when the Control UI is accessed through a Tailscale Serve HTTPS hostname, even though the same import works when the Control UI is opened directly on loopback.

The error shown in the UI is:

NetworkError when attempting to fetch resource.

Observed behavior

  • Accessing Control UI directly at http://127.0.0.1:18789:
    • importing a tweakcn theme works.
  • Accessing the same Control UI through a custom Tailscale Serve HTTPS hostname:
    • importing the same theme fails with NetworkError when attempting to fetch resource.

Tested theme inputs included:

https://tweakcn.com/editor/theme?theme=caffeine
https://tweakcn.com/r/themes/caffeine
caffeine

The direct registry endpoint itself is reachable and CORS-friendly:

content-type: application/json
access-control-allow-origin: *

Relevant CSP

Both the loopback and Tailscale-served Control UI responses include a CSP like:

Content-Security-Policy: default-src 'self'; base-uri 'none'; object-src 'none'; frame-ancestors 'none'; script-src 'self'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' data: blob:; font-src 'self' https://fonts.gstatic.com; worker-src 'self'; connect-src 'self' ws: wss: https://api.openai.com

Notably, connect-src does not include https://tweakcn.com, while the theme importer needs to fetch tweakcn registry URLs such as:

https://tweakcn.com/r/themes/<id>

Expected behavior

The tweakcn theme importer should work from supported Control UI access origins, including Tailscale Serve, or the UI should provide a clearer CSP-related error.

Possible fix

Allow the tweakcn registry origin in the Control UI CSP, for example:

connect-src 'self' ws: wss: https://api.openai.com https://tweakcn.com

Alternatively, proxy the tweakcn registry fetch through the gateway so the browser only connects to 'self'.

Privacy note

This report intentionally omits the actual Tailscale hostname, device names, and internal addressing.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

The tweakcn theme importer should work from supported Control UI access origins, including Tailscale Serve, or the UI should provide a clearer CSP-related error.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING