mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-17 14:11:07 +00:00
tiny fix
This commit is contained in:
parent
4982355885
commit
a403205abe
@ -69,7 +69,7 @@ module.exports = async function nuxtMiddleware(req, res, next) {
|
|||||||
|
|
||||||
if (this.options.render.csp && this.options.render.csp.enabled) {
|
if (this.options.render.csp && this.options.render.csp.enabled) {
|
||||||
const allowedSources = this.options.render.csp.allowedSources
|
const allowedSources = this.options.render.csp.allowedSources
|
||||||
const policies = {...{}, ...this.options.render.csp.policies}
|
const policies = this.options.render.csp.policies ? {...this.options.render.csp.policies} : null
|
||||||
let cspStr = `script-src 'self' ${(cspScriptSrcHashes).join(' ')}`
|
let cspStr = `script-src 'self' ${(cspScriptSrcHashes).join(' ')}`
|
||||||
if (Array.isArray(allowedSources)) {
|
if (Array.isArray(allowedSources)) {
|
||||||
// For compatible section
|
// For compatible section
|
||||||
|
Loading…
Reference in New Issue
Block a user