Skip to content

Commit d08d170

Browse files
authored
Add note about server-side tunneling with JS (#13143)
1 parent ac7dd3b commit d08d170

File tree

1 file changed

+1
-1
lines changed
  • docs/platforms/javascript/common/troubleshooting

1 file changed

+1
-1
lines changed

docs/platforms/javascript/common/troubleshooting/index.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ A tunnel is an HTTP endpoint that acts as a proxy between Sentry and your applic
159159

160160
Starting with version `6.7.0` of the JavaScript SDK, you can use the `tunnel` option to tell the SDK to deliver events to the configured URL, instead of using the DSN. This allows the SDK to remove `sentry_key` from the query parameters, which is one of the main reasons ad-blockers prevent sending events in the first place. This option also stops the SDK from sending preflight requests, which was one of the requirements that necessitated sending the `sentry_key` in the query parameters.
161161

162-
To enable the `tunnel` option, provide either a relative or an absolute URL in your `Sentry.init` call. When you use a relative URL, it's relative to the current origin, and this is the form that we recommend. Using a relative URL will not trigger a preflight CORS request, so no events will be blocked, because the ad-blocker will not treat these events as third-party requests.
162+
To enable the `tunnel` option, provide either a relative or an absolute URL in your `Sentry.init` call. When you use a relative URL, it's relative to the current origin, and this is the form that we recommend. Using a relative URL will not trigger a preflight CORS request, so no events will be blocked, because the ad-blocker will not treat these events as third-party requests. When using tunneling with server-side SDKs like `@sentry/node` or `@sentry/bun` you must provide an absolute URL.
163163

164164
```javascript
165165
Sentry.init({

0 commit comments

Comments
 (0)