From 5729ed62f7a2eae1dcff41f2437ec2b69d06a99e Mon Sep 17 00:00:00 2001 From: Schluffe Date: Sun, 25 Oct 2026 18:51:42 +0100 Subject: [PATCH] Add backend/.env.example It shows what ORIGINS has to look like: exactly what browsers send as Origin, so scheme, host and a non-default port, without path or trailing slash. Anything else locks out every client. CADDY_NETWORK is there too, commented out with its default. Co-Authored-By: Claude Opus 5.5 --- backend/.env.example | 9 +++++++++ backend/compose.yaml | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 backend/.env.example diff --git a/backend/.env.example b/backend/.env.example new file mode 100644 index 0000000..5e49b3f --- /dev/null +++ b/backend/.env.example @@ -0,0 +1,9 @@ +# Copy to .env next to compose.yaml and adjust. + +# Where HellCon is served from, as browsers send it in the Origin header: scheme, host and port if not +# the default, no path and no trailing slash. Several separated by commas or spaces. The tracker refuses +# every other origin. +ORIGINS=https://hellcon.example.org + +# The external network Caddy is on, "caddy" if unset. +#CADDY_NETWORK=caddy diff --git a/backend/compose.yaml b/backend/compose.yaml index 6c60e25..00039f9 100644 --- a/backend/compose.yaml +++ b/backend/compose.yaml @@ -1,6 +1,6 @@ # HellCon's own servers: a tracker behind Caddy and a STUN server. Neither is needed, the client works -# with any WebTorrent tracker and STUN server. Set ORIGINS in .env next to this file, e.g. -# ORIGINS=https://hellcon.example.org, then `docker compose up -d --build`. Caddy, in its own compose +# with any WebTorrent tracker and STUN server. Copy .env.example to .env and set ORIGINS there, then +# `docker compose up -d --build`. Caddy, in its own compose # project, proxies to the tracker over its network (CADDY_NETWORK, "caddy" unless set): # # tracker.example.org {