feat: scrub PII exposed by Cloudflare proxy services by default #1926
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.
Description
CloudFlare's proxy services are known to inject
CF-Connecting-IP
header in the request, which contains the real IP address of the requester. This header seems to have similar functionality asX-Forwarded-For
and/orX-Real-IP
.As with
X-Real-IP
andX-Forwarded-For
, the IP-address contained in theCF-Connecting-IP
header is considered PII and should be scrubbed by default.See also: https://developers.cloudflare.com/fundamentals/reference/http-headers/
Note
Adds
CF-Connecting-IP
toDEFAULT_SENSITIVE_HEADERS
so it’s sanitized by default when PII sending is disabled.CF-Connecting-IP
toDEFAULT_SENSITIVE_HEADERS
insrc/Integration/RequestIntegration.php
to sanitize this header by default when PII is disabled.Written by Cursor Bugbot for commit 5213bfa. This will update automatically on new commits. Configure here.