File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ const STATIC_STYLE_HASHES = [
1717 "'sha256-C8S6dNMSWod6IgqRVGm5rD7fWajo34AG++yTnMbIeks='" ,
1818 "'sha256-Z5XTK23DFuEMs0PwnyZDO9SWxemQ5HxcpVaBNuUJyWY='" ,
1919 "'sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU='" ,
20+ "'sha256-T1KFVNpOYPeQlhrHp2f1IL3jc6L7h/0WitSJN8II3no='" ,
2021] ;
2122const isProduction = process . env . NODE_ENV === "production" ;
2223const jwtSecret = process . env . JWT_SECRET ;
@@ -34,10 +35,10 @@ const buildContentSecurityPolicy = ( nonce: string ): string => {
3435 const staticStyleHashes = STATIC_STYLE_HASHES . join ( " " ) ;
3536 const styleSrc = isDev
3637 ? "'self' 'unsafe-inline'"
37- : `'self' 'nonce- ${ nonce } ' ${ staticStyleHashes } ` ;
38+ : `'self' ${ staticStyleHashes } ` ;
3839 const styleSrcElem = isDev
3940 ? "'self' 'unsafe-inline'"
40- : `'self' 'nonce- ${ nonce } ' ${ staticStyleHashes } ` ;
41+ : `'self' ${ staticStyleHashes } ` ;
4142 const cspHeader = `
4243 default-src 'self';
4344 script-src ${ scriptSrc } ;
You can’t perform that action at this time.
0 commit comments