Repository navigation
Conversation
…ecords the visitor IP Sentry SaaS replaces X-Sentry-Forwarded-For with the connecting IP, so tunneled events stored the tunnel server's IP. Pass the incoming CF-Connecting-IP, X-Vercel-Forwarded-For and X-Forwarded-For headers through, which SaaS keeps and prefers, as a rewrite proxy does. Fixes #26154 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit c359954. Configure here.
Contributor
size-limit report 📦Compared: 829c9ee (PR test merge using develop at a1a1de0) Against: a1a1de0 (develop) · base run #65235 ✅ Baseline matches: this diff contains only this PR's changes.
|
Contributor
Optional E2E testsSome optional checks were not successful. They do not block the merge. 7 not successful, 49 successful. See the run.
Successful checks
|
This branch has not been deployed
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.
Fixes #26154
Server tunnels sent the visitor IP to Sentry only as
X-Sentry-Forwarded-For. Sentry SaaS replaces that header with the connecting IP, so events sent through a tunnel stored the server's IP. The tunnel now also passes through the incomingCF-Connecting-IP,X-Vercel-Forwarded-ForandX-Forwarded-Forheaders, which SaaS keeps and prefers over it. A rewrite proxy sends the same headers.X-Sentry-Forwarded-Forstays for self-hosted Relay.Tested against sentry.io (de region) with a Next.js handler mode app. Before the fix, a request behind Cloudflare and one with only
X-Forwarded-Forboth stored the server IP. After the fix, both store the client IP.Behind a proxy that appends to
X-Forwarded-For, a client can pick the first entry and so its stored IP. A rewrite proxy behaves the same, and events can already setuser.ip_address. Not tested on Cloudflare Workers or Vercel Edge, which may change these headers on outgoing requests.