Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🤖 AI Review
Both independent reviews reported no findings. Verified the changed header handling, HTTP and WebSocket callers, and integration coverage against the surrounding code; no actionable issues found. Tests were not run because dependencies are unavailable.
Findings
No issues found.
Stats
Claude findings: 0 · Codex findings: 0 · Confirmed: 0 · Refuted: 0 · Uncertain: 0
Models: claude-opus-5-5 + gpt-6.1-sol · Trigger: auto · Workflow run
This review runs once per PR. A maintainer can request another with a /ai-review comment.
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 27, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 27, 2026
…-forwarded-for-or-x-real-ip-so
Member
Author
|
left the queue twice on the
|
7ttp
enabled auto-merge
October 27, 2026 17:25
7ttp
deleted the
7ttp/cli-2823-stack-the-gateway-sets-no-x-forwarded-for-or-x-real-ip-so
branch
October 27, 2026 17:31
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.
TL;DR
adds
X-Forwarded-ForandX-Real-IPto what the stack gateway sends upstream, so edge functions can see who is calling themwhats introduced?
the gateway now appends the client address to any incoming
X-Forwarded-Forchain and setsX-Real-IPto the client address, the same way the legacy backend doesboth the http path and the websocket upgrade path send them
a client sent
X-Real-IPis always replaced or dropped, so callers cant spoof it through the gatewayvisual rep
flowchart LR subgraph before A1[client] --> B1[stack gateway] B1 --> C1[edge function sees no client address] end subgraph now A2[client] --> B2[stack gateway] B2 --> D2{peer address known} D2 -->|yes| E2["append client to X-Forwarded-For<br/>set X-Real-IP to client"] D2 -->|no| F2[drop client sent X-Real-IP] E2 --> G2[http and websocket upstreams] F2 --> G2 G2 --> H2[edge function sees the caller] endref