File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
packages/astro/src/runtime/server/render Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' astro ' : patch
3+ ---
4+
5+ Fixes a bug where quotes were not added to the 'strict-dynamic' CSP directive
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ export function renderCspContent(result: SSRResult): string {
3535 styleResources = result . styleResources . map ( ( r ) => `${ r } ` ) . join ( ' ' ) ;
3636 }
3737
38- const strictDynamic = result . isStrictDynamic ? ` strict-dynamic` : '' ;
38+ const strictDynamic = result . isStrictDynamic ? ` ' strict-dynamic' ` : '' ;
3939 const scriptSrc = `script-src ${ scriptResources } ${ Array . from ( finalScriptHashes ) . join ( ' ' ) } ${ strictDynamic } ;` ;
4040 const styleSrc = `style-src ${ styleResources } ${ Array . from ( finalStyleHashes ) . join ( ' ' ) } ;` ;
4141 return `${ directives } ${ scriptSrc } ${ styleSrc } ` ;
You can’t perform that action at this time.
0 commit comments