Skip to content
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

feat(sveltekit): Document new sentryHandle options #8768

Merged
merged 6 commits into from
Dec 23, 2023

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Dec 22, 2023

Adds documentation for the two new options available with v7.91.0 in the SvelteKit SDK's sentryHandle request handler:

ref: getsentry/sentry-javascript#9969

Copy link

vercel bot commented Dec 22, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 23, 2023 10:09am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
sentry-docs-next ⬜️ Ignored (Inspect) Visit Preview Dec 23, 2023 10:09am

@Lms24 Lms24 requested review from mydea and lforst December 22, 2023 11:37
@Lms24 Lms24 force-pushed the lms/feat-seveltekit-handle-csp-options branch from 4368c23 to c5c2f2c Compare December 22, 2023 11:43

```javascript {filename:hooks.server.ts}
// Add the nonce to the <script> tag:
export const handle = sentryHandle({ fetchProxyScriptNonce: "2726c7f26c" });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the actual nonce users need to define or do they potentially have a different one?

Copy link
Member Author

@Lms24 Lms24 Dec 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh good point, this might be missleading. No, it can be any nonce. Just needs to match the one specified in the CSP directive. Probably better to replace with fetchProxyScriptNonce: "_YOUR_NONCE_"

src/platforms/javascript/guides/sveltekit/manual-setup.mdx Outdated Show resolved Hide resolved
Copy link
Contributor

@vivianyentran vivianyentran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks for documenting!

Co-authored-by: vivianyentran <20403606+vivianyentran@users.noreply.github.com>
@Lms24 Lms24 enabled auto-merge (squash) December 23, 2023 10:03
@Lms24 Lms24 merged commit 8bd148e into master Dec 23, 2023
8 of 9 checks passed
@Lms24 Lms24 deleted the lms/feat-seveltekit-handle-csp-options branch December 23, 2023 10:07
@github-actions github-actions bot locked and limited conversation to collaborators Jan 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants