GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Default config still sends client IPs in CF-Connecting-IP, True-Client-IP, Forwarded and X-Client-IP headers · Issue #8097 · getsentry/sentry-python

Default config still sends client IPs in CF-Connecting-IP, True-Client-IP, Forwarded and X-Client-IP headers #8097

New issue
Copy link
New issue
Copy link
Open
#8108
Open
Default config still sends client IPs in CF-Connecting-IP, True-Client-IP, Forwarded and X-Client-IP headers#8097
#8108
Copy link

Description

@4ktLuffy
4ktLuffy
opened on Oct 21, 2026
Issue body actions

How do you use Sentry?

Sentry Saas (sentry.io)

Version

2.72.0 (also on master)

Steps to Reproduce

Default config, no send_default_pii, no data_collection:

import sentry_sdk
from flask import Flask

seen = []
sentry_sdk.init(dsn="http://k@localhost/1", transport=lambda event: seen.append(event))

app = Flask(__name__)
app.logger.disabled = True


@app.route("/")
def index():
    raise ValueError("boom")


ips = {
    "X-Forwarded-For": "203.0.113.1",
    "X-Real-IP": "203.0.113.2",
    "CF-Connecting-IP": "203.0.113.3",
    "True-Client-IP": "203.0.113.4",
    "Forwarded": "for=203.0.113.5",
    "X-Client-IP": "203.0.113.6",
}
app.test_client().get("/", headers=ips)
sentry_sdk.flush()
sent = {k.lower(): v for k, v in seen[0]["request"]["headers"].items()}
for name in ips:
    print(f"{name:18} {sent.get(name.lower(), '(not sent)') or '(blanked)'}")

Expected Result

No client IP in the event. The docs say "By default, the Sentry SDK doesn't send the user's IP address" (https://docs.sentry.io/platforms/python/data-management/data-collected/).

Actual Result

X-Forwarded-For    (blanked)
X-Real-IP          (blanked)
CF-Connecting-IP   203.0.113.3
True-Client-IP     203.0.113.4
Forwarded          for=203.0.113.5
X-Client-IP        203.0.113.6

The default only blanks X-Forwarded-For and X-Real-IP (SENSITIVE_ENV_KEYS in integrations/_wsgi_common.py). Same on transactions and streamed spans. The terms in data_collection.py ("forwarded", "-ip", "remote-", "via", "-user") would cover these, but the default path doesn't use them for headers.

Activity

  1. getsantry
    added
    Waiting for: Product Owner
    on Oct 21, 2026
  2. linear-code commented on Oct 21, 2026

    @linear-code
    linear-codeBot
    on Oct 21, 2026 – with Linear Code
    More actions

    PY-3030

  3. getsantry
    added this to GitHub Issues with 👀 3on Oct 21, 2026
  4. getsantry
    moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Oct 21, 2026
  5. sentrivana
    removed
    Waiting for: Product Owner
    on Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    • GitHub Issues with 👀 3
      Status
      Waiting for: Product Owner
      Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.