This commit is contained in:
HugoRCD
2025-05-19 10:49:49 +02:00
parent f1128c2450
commit 91d06d4d51
2 changed files with 13 additions and 3 deletions

View File

@@ -23,7 +23,9 @@ export const defaultOptions = {
colors: undefined,
transitions: true
},
csp: false
csp: {
nonce: false
}
}
export const resolveColors = (colors?: string[]) => {

View File

@@ -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