mirror of
https://github.com/langgenius/dify.git
synced 2026-05-25 19:00:43 -04:00
18 lines
538 B
TypeScript
18 lines
538 B
TypeScript
import { IS_PROD } from '@/config'
|
|
import { headers } from '@/next/headers'
|
|
import Script from '@/next/script'
|
|
import { buildCreateAppAttributionBootstrapScript } from '@/utils/create-app-tracking'
|
|
|
|
export async function CreateAppAttributionBootstrap() {
|
|
const nonce = IS_PROD ? (await headers()).get('x-nonce') ?? undefined : undefined
|
|
return (
|
|
<Script
|
|
id="create-app-attribution-bootstrap"
|
|
strategy="beforeInteractive"
|
|
nonce={nonce}
|
|
>
|
|
{buildCreateAppAttributionBootstrapScript()}
|
|
</Script>
|
|
)
|
|
}
|