From 81ed4650955f4d3d4c1c9ca22afbe147eb976e93 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Wed, 4 Nov 2026 14:04:51 -0500 Subject: [PATCH] Document the Forwarded header check for proxied installs Rails now refuses a request whose Forwarded and X-Forwarded-For headers name different clients. Behind a proxy that adds Forwarded from a public address, that breaks every signed-in page. Say how to avoid it. --- docs/self-hosting.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/self-hosting.md b/docs/self-hosting.md index 5398e0c..2fafb21 100644 --- a/docs/self-hosting.md +++ b/docs/self-hosting.md @@ -104,6 +104,11 @@ If you are terminating SSL in some other proxy in front of Campfire, or aren't u docker run --publish 80:80 --env DISABLE_SSL=true ... ``` +> [!IMPORTANT] +> Campfire refuses a request when its `Forwarded` header names a different client than its `X-Forwarded-For` header, so that no one can fake their IP address. +> If your proxy adds a `Forwarded` header and connects to Campfire from a public IP address, every signed-in page and every form submission fails with a 500 error. +> To avoid this, connect the proxy to Campfire over a private network (`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`, or localhost), or configure the proxy not to send `Forwarded`. + #### Error reporting (optional) To enable error reporting to Sentry in production, supply your DSN in the `SENTRY_DSN` environment variable.