Skip to content

SvelteKit setup: fetchProxyScriptNonce configuration #14285

Answered by Lms24
hlesmana-var asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @hlesmana-var you can specify a nonce as documented by specifying fetchProxyScriptNonce.

To confirm: I realize this is "static" in the sense that the sentryHandle function is a hook, so the passed nonce needs to be determined before the function is invoked. Are you asking for a way to dynamically read the nonce for each request?

Your suggestion to create your own hook to determine a nonce doesn't work right now out of the box. I think we could take a look at the locals object and check for a specific object. What's your specific use case?

If you use a SvelteKit version above 1.26.0 you should be good to disable the fetch script injection and our fetch instrumentation should still work…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@hlesmana-var
Comment options

Answer selected by hlesmana-var
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants