Skip to content

Commit

Permalink
Merge pull request #16 from jill64/renovate/toucan-js-3.x
Browse files Browse the repository at this point in the history
chore(deps): update dependency toucan-js to v3
  • Loading branch information
jill64 authored Sep 10, 2023
2 parents 2ca0529 + 96a4a92 commit 533cf55
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 105 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@
"@sentry/utils": "^7.68.0",
"@sveltejs/kit": "^1.24.1",
"esm-env": "^1.0.0",
"toucan-js": "^2.7.0"
"toucan-js": "^3.2.3"
}
}
30 changes: 15 additions & 15 deletions packages/lib/src/server/initSentry.ts
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
import { isPrimitive } from '@sentry/utils'
import type { Options } from 'toucan-js'
import Toucan from 'toucan-js'
import { Toucan, RewriteFrames } from 'toucan-js'

export const initSentry = (
request: Request,
additionalOptions?: Partial<Options>
) => {
const sentry = new Toucan({
request,
allowedHeaders: [
'user-agent',
'cf-challenge',
'accept-encoding',
'accept-language',
'cf-ray',
'content-length',
'content-type',
'x-real-ip',
'host'
],
allowedSearchParams: /(.*)/,
rewriteFrames: {
root: '/'
requestDataOptions: {
allowedHeaders: [
'user-agent',
'cf-challenge',
'accept-encoding',
'accept-language',
'cf-ray',
'content-length',
'content-type',
'x-real-ip',
'host'
],
allowedSearchParams: /(.*)/
},
integrations: [new RewriteFrames({ root: '/' })],
...additionalOptions
})

Expand Down
137 changes: 48 additions & 89 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 533cf55

Please sign in to comment.