Relationships
#990 Allow swamp clients to send custom headers when connecting to swamp serve
Opened by evrardjp · 7/6/2026· Shipped 7/6/2026
Problem
I want to run swamp serve behind a reverse proxy or tunnel. Some reverse proxies/tunnels require clients to include arbitrary HTTP headers before they will forward traffic to the backend. Today there does not appear to be a way for swamp client-side commands to attach those required headers when connecting to a swamp serve endpoint.
Desired behavior
Add a supported client-side configuration/flag/env-var mechanism for swamp clients to send custom HTTP headers when connecting to swamp serve.
Example use cases:
- Reverse proxy/tunnel authentication headers such as
Tunnel-Token: ...or provider-specific access headers. (I need to send multiple headers!) - Local/private deployments where access to the served swamp API is gated by a proxy that expects one or more static headers.
Possible UX
Any of these would work; exact design is up to the project:
- CLI flags, for example
--header "Name: value", repeatable. - Client config, for example a per-server list of headers.
- Environment variables for automation/CI.
Headers may contain secrets, so the implementation should avoid logging values and should document safe storage/retrieval guidance.
Acceptance criteria
- A user can configure one or more arbitrary HTTP headers on the client side.
- Those headers are sent on requests to a configured
swamp serveendpoint. - Header values are not exposed in normal logs/error output.
- Documentation explains how to use this behind a reverse proxy/tunnel.
Context
This is specifically for clients connecting to swamp serve through a reverse proxy/tunnel that enforces required request headers.
Shipped
Click a lifecycle step above to view its details.