Skip to main content
← Back to list
01Issue
FeatureShippedSwamp CLIPublicTeam
AssigneesNone

Relationships

#4509 swamp dashboard: trusted-host / bind option so it can be reached through a reverse proxy

Opened by kneel · 11/7/2026· Shipped 11/8/2026

Problem

swamp dashboard binds 127.0.0.1 only and validates the HTTP Host header (DNS-rebind protection), returning 421 Misdirected Request for any Host that is not loopback. There is no flag to change either behaviour (--help shows only --no-browser).

That makes the dashboard unreachable through a reverse proxy. Concretely, with tailscale serve fronting the dashboard on a private tailnet, the proxy forwards the real Host (<machine>.<tailnet>.ts.net) and the dashboard answers 421. swamp serve is not an alternative: its root is the API/websocket server ({"status":"ok","version":"1"}), not the dashboard UI.

The only workaround today is an SSH port-forward (so the dashboard sees Host: localhost), which defeats the point of having a proxy and is awkward for viewing the dashboard from a phone or another device on a trusted tailnet.

Desired

An explicit, opt-in way to let the dashboard sit behind a trusted proxy. Any of:

  • --host <addr> to bind a non-loopback interface (mirrors swamp serve --host);
  • --trusted-host <name> (repeatable) and/or an env var to add Host values the dashboard accepts, instead of rejecting with 421;
  • a flag to disable the Host check for a run.

Keep loopback + Host-lock the default (the DNS-rebind protection is good). This is strictly an opt-in for a trusted-network reverse-proxy setup.

Use case

Viewing the Agent sessions dashboard over a private Tailscale tailnet from a second device, without an SSH port-forward, by putting tailscale serve (or caddy/nginx) in front of it.

Environment

  • swamp 20261106.012700.0-sha.ebf04ac6, Linux
  • Repro: swamp dashboard --no-browser, then curl -H 'Host: [HOST-1]' http://127.0.0.1:<port>/ -> 421.
02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPEDLINKED+ 3 MOREPR_LINKED+ 2 MORESESSION_SUMMARIZED

Shipped

11/8/2026, 2:11:47 AM

Click a lifecycle step above to view its details.

03Sludge Pulse
kneel moved this from a private collective to public11/7/2026, 11:46:49 PM
Editable. Press Enter to edit.

stack72 commented 11/8/2026, 2:11:49 AM

Thanks @kneel for reporting this! The fix has been merged and a release is on its way. We appreciate your contribution to swamp.

Sign in to post a ripple.