mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 09:27:13 +00:00
fix(server): don't call getCspString
when cspScriptSrcHashes
is unavailable (#5474)
Co-Authored-By: Andreas Zoellner <andreaszoellner@gmail.com>
This commit is contained in:
parent
7ec48c3af0
commit
2ca08a6bf3
@ -69,7 +69,7 @@ export default ({ options, nuxt, renderRoute, resources }) => async function nux
|
||||
}
|
||||
}
|
||||
|
||||
if (options.render.csp) {
|
||||
if (options.render.csp && cspScriptSrcHashes) {
|
||||
const { allowedSources, policies } = options.render.csp
|
||||
const cspHeader = options.render.csp.reportOnly ? 'Content-Security-Policy-Report-Only' : 'Content-Security-Policy'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user