Repository navigation
docs(javascript): clarify HTTP headers require sendDefaultPii #19070
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -22,9 +22,9 @@ Regardless of these options, you can always scrub any data before it's sent to S | |||||||||||||||
|
|
||||||||||||||||
| ## HTTP Headers | ||||||||||||||||
|
|
||||||||||||||||
| By default, the Sentry SDK sends HTTP request and response headers. | ||||||||||||||||
| By default, the Sentry SDK does **not** send HTTP response headers, and most request headers are omitted as well (for example, browser SDKs may only include limited request headers such as `User-Agent`). When using `dataCollection`, however, request and response headers are collected with sensitive values scrubbed. Opt out by setting `dataCollection: { httpHeaders: false }`. | ||||||||||||||||
|
|
||||||||||||||||
| Use the `dataCollection.httpHeaders` option to control this. For example, set `dataCollection: { httpHeaders: false }` to disable it, or use `{ allow: [...] }` or `{ deny: [...] }` to restrict which header values are sent. Values whose keys match Sentry's built-in sensitive denylist (such as `auth`, `token`, or `password`) are automatically scrubbed, while the keys are kept. | ||||||||||||||||
| To collect HTTP headers when not using `dataCollection`, set the deprecated `sendDefaultPii: true` in `Sentry.init()`. Response headers in particular require this opt-in (or an explicit `dataCollection.httpHeaders` setting). You can also restrict which header values are sent using `{ allow: [...] }` or `{ deny: [...] }` on `dataCollection.httpHeaders`. Values whose keys match Sentry's built-in sensitive denylist (such as `auth`, `token`, or `password`) are automatically scrubbed, while the keys are kept. | ||||||||||||||||
|
Comment on lines
+25
to
+27
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "most request headers are omitted" isn't right for current versions: on the server, request headers are sent by default and only sensitive values are
Suggested change
|
||||||||||||||||
|
|
||||||||||||||||
| ## Cookies | ||||||||||||||||
|
|
||||||||||||||||
|
|
||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Request headers don't need
sendDefaultPii, and the response-header part only applies to the browserhttpClientintegration whendataCollectionis unset. I'd keep just the link to the Data Collected page here.