This is a follow-up of Vercel Toolbar with strict CSP? 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://vercel.community/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.