Compare commits

...

2 Commits

Author SHA1 Message Date
Samy Pessé 0f7ac7ca08 Merge branch 'main' into fix-iframely-csp 2024-04-18 08:39:09 -07:00
Samy Pessé 119c22af11 Pass a nonce to the script for cdn.iframe.ly/embed.js 2024-04-18 08:25:11 -07:00
+7 -1
View File
@@ -3,6 +3,7 @@ import Script from 'next/script';
import { Card } from '@/components/primitives';
import { api } from '@/lib/api';
import { getContentSecurityPolicyNonce } from '@/lib/csp';
import { tcls } from '@/lib/tailwind';
import { BlockProps } from './Block';
@@ -23,7 +24,12 @@ export async function Embed(props: BlockProps<DocumentBlockEmbed>) {
}}
/>
{/* We load the iframely script to resize the embed iframes dynamically */}
<Script src="https://cdn.iframe.ly/embed.js" defer async />
<Script
src="https://cdn.iframe.ly/embed.js"
defer
async
nonce={getContentSecurityPolicyNonce()}
/>
</>
) : (
<Card