Commit graph

2 commits

Author SHA1 Message Date
Marcel Roozekrans
7f88c25489
feat(web): --allowed-host for an authenticating reverse proxy (#1789)
codeburn web only answers to loopback Host and Origin values, which makes it unreachable behind a reverse proxy even when that proxy authenticates (oauth2-proxy, Authelia, Traefik with Keycloak). A repeatable --allowed-host flag adds exact hostnames to the guard, matched case-insensitively and without the port, against both Host and Origin. Without the flag nothing changes.

The guard lives in two exported helpers, isAllowedHost and isAllowedOrigin, with unit tests for the loopback default, exact matching (dash.example.org.evil.example and evil-dash.example.org are refused), Origin limited to http and https, and null refused, plus server tests for a proxied Host and allowed and refused Origins. docs/web.md gains a section on running behind a reverse proxy.

The --host flag from the original proposal is dropped. The dashboard has no authentication, so a non-loopback bind would give any LAN client that sends Host: localhost every route, the share and pairing POSTs included. The bind stays on 127.0.0.1; a proxy on the same machine forwards to it and its Host and Origin pass the guard. Access control is the proxy's job and the docs say so.

Authored by @MarcelRoozekrans. Reviewed and tested locally against real data; the maintainer commit on top removes --host.
2026-11-02 17:17:06 +01:00
Resham Joshi
f54345a5c3
README: tell the story first, keep the manual in docs (#1527)
Some checks are pending
CI / semgrep (push) Waiting to run
Tests / test (22) (push) Waiting to run
Tests / test (22.13.0) (push) Waiting to run
Tests / test (24) (push) Waiting to run
Tests / test (26) (push) Waiting to run
Tests / test-platforms (macos-latest) (push) Waiting to run
Tests / test-platforms (windows-latest) (push) Waiting to run
Tests / desktop (push) Waiting to run
* docs: move the README reference manual into docs/

* assets: designed README images and their sources

* README: tell the story first, keep the manual in docs
2026-09-22 16:28:27 +02:00