-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Description
In the original raven-js client for Sentry, it was possible to customize the options sent to fetch; it doesn't look like the transport in @sentry/browser supports that today.
sentry-javascript/packages/browser/src/transports/fetch.ts
Lines 14 to 27 in 2f46059
| const defaultOptions: RequestInit = { | |
| body: JSON.stringify(event), | |
| method: 'POST', | |
| // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default | |
| // https://caniuse.com/#feat=referrer-policy | |
| // It doesn't. And it throw exception instead of ignoring this parameter... | |
| // REF: https://github.com/getsentry/raven-js/issues/1233 | |
| referrerPolicy: (supportsReferrerPolicy() ? 'origin' : '') as ReferrerPolicy, | |
| }; | |
| return this._buffer.add( | |
| global.fetch(this.url, defaultOptions).then(response => ({ | |
| status: Status.fromHttpCode(response.status), | |
| })), |
My use case is that our instance of Sentry lives behind an endpoint that uses cookie auth, however it's on a separate subdomain from the applications generating the errors. As a result, we need to use credentials: 'include' on fetch in order to pass cookies along.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Fields
Give feedbackNo fields configured for issues without a type.