mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 23:22:02 +00:00
chore: fix type check
csp is not boolean but typed as boolean. we need to fix schema.
This commit is contained in:
parent
c79d2bc43d
commit
80875b7960
@ -97,7 +97,8 @@ function clientPlugins (ctx: WebpackConfigContext) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getCspScriptPolicy (ctx: WebpackConfigContext) {
|
function getCspScriptPolicy (ctx: WebpackConfigContext) {
|
||||||
const { csp } = ctx.options.render
|
// TODO
|
||||||
|
const { csp } = ctx.options.render as any
|
||||||
if (typeof csp === 'object') {
|
if (typeof csp === 'object') {
|
||||||
const { policies = {} } = csp
|
const { policies = {} } = csp
|
||||||
return policies['script-src'] || policies['default-src'] || []
|
return policies['script-src'] || policies['default-src'] || []
|
||||||
|
Loading…
Reference in New Issue
Block a user