From 91d06d4d51af7eda8653f6d6822355ad4d420c05 Mon Sep 17 00:00:00 2001 From: HugoRCD Date: Mon, 19 May 2025 10:49:49 +0200 Subject: [PATCH] up --- src/defaults.ts | 4 +++- src/module.ts | 12 ++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/defaults.ts b/src/defaults.ts index 52c117a3..8e73f864 100644 --- a/src/defaults.ts +++ b/src/defaults.ts @@ -23,7 +23,9 @@ export const defaultOptions = { colors: undefined, transitions: true }, - csp: false + csp: { + nonce: false + } } export const resolveColors = (colors?: string[]) => { diff --git a/src/module.ts b/src/module.ts index 54f647d5..9f6de75a 100644 --- a/src/module.ts +++ b/src/module.ts @@ -30,10 +30,18 @@ export interface ModuleOptions { /** * Configure Content Security Policy for Nuxt UI - * @defaultValue `false` + * @defaultValue `{ nonce: false }` * @link https://ui.nuxt.com/getting-started/installation/nuxt#csp */ - csp?: boolean + csp?: { + /** + * Enable nonce for inline styles. + * Set to `true` to automatically generate and use a nonce. + * Provide a string to use a specific nonce. + * @defaultValue `false` + */ + nonce?: boolean | string + } /** * Customize how the theme is generated