This commit is contained in:
HugoRCD
2025-05-19 12:24:08 +02:00
parent 0f90645c84
commit fbf7475e0d
3 changed files with 4 additions and 7 deletions

View File

@@ -23,7 +23,7 @@ export default defineNuxtPlugin(() => {
const appConfig = useAppConfig()
const nuxtApp = useNuxtApp()
const nonce = computed(() => (appConfig.ui as any)?.csp?.nonce as string | undefined)
const nonce = computed(() => appConfig.ui?.csp?.nonce)
const root = computed(() => {
const { neutral, ...colors } = appConfig.ui.colors
@@ -42,7 +42,6 @@ export default defineNuxtPlugin(() => {
})
// Head
console.log('head nonce', nonce.value)
const headData: UseHeadInput = {
style: [{
innerHTML: () => root.value,
@@ -59,7 +58,6 @@ export default defineNuxtPlugin(() => {
style.innerHTML = root.value
style.setAttribute('data-nuxt-ui-colors', '')
console.log('SPA nonce', nonce.value)
if (nonce.value) {
style.setAttribute('nonce', nonce.value)
}