mirror of
https://github.com/langgenius/dify.git
synced 2026-05-10 14:14:17 +08:00
try pass nonce to next theme
This commit is contained in:
parent
d06ce2ef78
commit
731adab593
@ -6,6 +6,7 @@ import GlobalPublicStoreProvider from '@/context/global-public-context'
|
||||
import { TanstackQueryInitializer } from '@/context/query-client'
|
||||
import { getDatasetMap } from '@/env'
|
||||
import { getLocaleOnServer } from '@/i18n-config/server'
|
||||
import { headers } from '@/next/headers'
|
||||
import { ToastHost } from './components/base/ui/toast'
|
||||
import { TooltipProvider } from './components/base/ui/tooltip'
|
||||
import PartnerStackCookieRecorder from './components/billing/partner-stack/cookie-recorder'
|
||||
@ -31,6 +32,7 @@ const LocaleLayout = async ({
|
||||
}) => {
|
||||
const locale = await getLocaleOnServer()
|
||||
const datasetMap = getDatasetMap()
|
||||
const nonce = (await headers()).get('x-nonce') ?? undefined
|
||||
|
||||
return (
|
||||
<html lang={locale ?? 'en'} className="h-full" suppressHydrationWarning>
|
||||
@ -62,6 +64,7 @@ const LocaleLayout = async ({
|
||||
enableSystem
|
||||
disableTransitionOnChange
|
||||
enableColorScheme={false}
|
||||
nonce={nonce}
|
||||
>
|
||||
<NuqsAdapter>
|
||||
<TanstackQueryInitializer>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user