mirror of
https://github.com/langgenius/dify.git
synced 2026-05-10 05:56:31 +08:00
try pass nonce
This commit is contained in:
parent
e8a3771d53
commit
6f909a59e7
@ -5,9 +5,11 @@ import { Provider as JotaiProvider } from 'jotai/react'
|
||||
import { ThemeProvider } from 'next-themes'
|
||||
import { NuqsAdapter } from 'nuqs/adapters/next/app'
|
||||
import AmplitudeProvider from '@/app/components/base/amplitude'
|
||||
import { IS_PROD } from '@/config'
|
||||
import { TanstackQueryInitializer } from '@/context/query-client'
|
||||
import { getDatasetMap } from '@/env'
|
||||
import { getLocaleOnServer } from '@/i18n-config/server'
|
||||
import { headers } from '@/next/headers'
|
||||
import PartnerStackCookieRecorder from './components/billing/partner-stack/cookie-recorder'
|
||||
import CreateAppAttributionBootstrap from './components/create-app-attribution-bootstrap'
|
||||
import { AgentationLoader } from './components/devtools/agentation-loader'
|
||||
@ -32,6 +34,7 @@ const LocaleLayout = async ({
|
||||
}) => {
|
||||
const locale = await getLocaleOnServer()
|
||||
const datasetMap = getDatasetMap()
|
||||
const nonce = IS_PROD ? (await headers()).get('x-nonce') ?? undefined : undefined
|
||||
|
||||
return (
|
||||
<html lang={locale ?? 'en'} className="h-full" suppressHydrationWarning>
|
||||
@ -64,6 +67,7 @@ const LocaleLayout = async ({
|
||||
defaultTheme="system"
|
||||
enableSystem
|
||||
disableTransitionOnChange
|
||||
nonce={nonce}
|
||||
>
|
||||
<NuqsAdapter>
|
||||
<TanstackQueryInitializer>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user