import { headers } from 'next/headers' interface JsonLdProps { data: Record } /** * Renders JSON-LD structured data in a script tag for search engine consumption. * Uses dangerouslySetInnerHTML to prevent React from HTML-escaping JSON characters. * Escapes `<` as `\u003c` to prevent script tag breakout from content-derived fields. */ export async function JsonLd({ data }: JsonLdProps) { const nonce = (await headers()).get('x-nonce') ?? undefined const safeJson = JSON.stringify(data).replace(/ ) }