feat: configurable control ui base path

This commit is contained in:
Peter Steinberger
2026-01-03 17:54:52 +01:00
parent 822def84d2
commit 1d6de24ab3
18 changed files with 310 additions and 857 deletions

View File

@@ -6,9 +6,10 @@ read_when:
---
# Control UI (browser)
The Control UI is a small **Vite + Lit** single-page app served by the Gateway under:
The Control UI is a small **Vite + Lit** single-page app served by the Gateway:
- `http://<host>:18789/`
- default: `http://<host>:18789/`
- optional prefix: set `gateway.controlUi.basePath` (e.g. `/clawdis`)
It speaks **directly to the Gateway WebSocket** on the same port.
@@ -40,7 +41,7 @@ clawdis gateway --tailscale serve
```
Open:
- `https://<magicdns>/ui/`
- `https://<magicdns>/` (or your configured `gateway.controlUi.basePath`)
By default, the gateway trusts Tailscale identity headers in serve mode. You can still set
`CLAWDIS_GATEWAY_TOKEN` or `gateway.auth` if you want a shared secret instead.
@@ -52,7 +53,7 @@ clawdis gateway --bind tailnet --token "$(openssl rand -hex 32)"
```
Then open:
- `http://<tailscale-ip>:18789/ui/`
- `http://<tailscale-ip>:18789/` (or your configured `gateway.controlUi.basePath`)
Paste the token into the UI settings (sent as `connect.params.auth.token`).
@@ -65,6 +66,12 @@ pnpm ui:install
pnpm ui:build
```
Optional absolute base (when you want fixed asset URLs):
```bash
CLAWDIS_CONTROL_UI_BASE_PATH=/clawdis/ pnpm ui:build
```
For local development (separate dev server):
```bash