Repository navigation
docs: say how the web app really passes on X-Forwarded-For - #161
Merged
Merged
Conversation
The configuration page said the web app adds the visitor's address to X-Forwarded-For. It passes the header on unchanged; Next.js fills in the connecting address only when a request carries none. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W42z4FbekWr33b6791svQQ
Owner
Author
|
Local CI: green. The self-hosted runner is down, so I replayed every PR job from Local CI on PR #161 head a3a1f7d merged into main f69d6af, 2026-10-05 07:13 UTC
Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Adeel · project thread
Description
Before: docs/configuration.md said the web app passes on
X-Forwarded-For"and adds the address it was reached from".After: the page says what actually happens.
lib/api/backend-proxy.tscopies the header through unchanged. When a request has noX-Forwarded-For, Next.js 16 fills in the connecting address itself (node_modules/next/dist/server/base-server.js:612,req.headers['x-forwarded-for'] ??= socket.remoteAddress). So without a reverse proxy, IP groups do see real visitor addresses, unless the visitor sends their own header. The reverse-proxy bullet now names that header as the way a visitor can claim another address.Motivation and Context
The threat model's surface pass flagged this mismatch. Checking it showed the code is fine for visitors who send no header, and spoofing without a reverse proxy was already documented. That left the docs as the only defect. Making the web app append the real address would change which address IP groups see behind a remote reverse proxy or the Cloudflare tunnel, so this PR leaves that for the maintainer to decide.
Types of changes
!in the title)Docs only.
Checklist:
make hookschecks it on commit).docs/accordingly.## UnreleasedinCHANGELOG.md.🤖 Generated with Claude Code
https://claude.ai/code/session_01W42z4FbekWr33b6791svQQ
Generated by Claude Code