This is a follow-up of https://community.vercel.com/t/vercel-toolbar-with-strict-csp/471 since the thread has been closed and replies are no longer possible.
I wanted to see if there are any plans to support this? currently we need to do some dirty trickets to get the toolbar to work, for example:
// allow toolbar for internal team: see https://community.vercel.com/t/vercel-toolbar-with-strict-csp/471 const disableVercelToolbar = !rootData?.user?.email?.includes('@acme.com')
// see: https://web.dev/articles/strict-csp const cspHeader = createCspHeader( { 'script-src': `'nonce-${nonce}' 'unsafe-inline' 'unsafe-eval' https: http:`, 'object-src': "'none'", 'base-uri': "'none'", }, { includeHeaderName: false, presets: disableVercelToolbar ? [{ 'script-src': "'strict-dynamic'" }] : [], } )
responseHeaders.set('Content-Security-Policy', cspHeader)It would be great if we could get some support with strict-dynamic + nonce csp headers.