Commit d2df7f6
authored
fix(core): Find the correct IP address regardless their case (#18880)
closes
[FE-681](https://linear.app/getsentry/issue/FE-681/senddefaultpii-sets-cloudflare-worker-ip-instead-of-the-one-from-the)
It seems that in some cases the headers do have a different casing. E.g.
in Cloudflare Workers the
`[CF-Connecting-IP](https://developers.cloudflare.com/fundamentals/reference/http-headers/#cf-connecting-ip)`
is actually send as `Cf-Connecting-Ip`.
<img width="635" height="223" alt="Screenshot 2026-01-19 at 13 15 27"
src="https://github.com/user-attachments/assets/e427e10d-35b7-4743-980c-3ff0d5cc1d51"
/>
According to [RFC7540
8.1.2](https://www.rfc-editor.org/rfc/rfc7540#section-8.1.2) the headers
are case-insensitive, but for HTTP2 they must be lowercase. So
theoretically this would fix also HTTP2 lower case headers1 parent 75b183d commit d2df7f6
File tree
2 files changed
+18
-1
lines changed- packages/core
- src/vendor
- test/lib/vendor
2 files changed
+18
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
55 | 63 | | |
56 | 64 | | |
57 | 65 | | |
58 | | - | |
| 66 | + | |
59 | 67 | | |
60 | 68 | | |
61 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
32 | 41 | | |
0 commit comments