nginx - nunjuncks not rendering because of Content-Security-Policy -


the error:

uncaught template render error: (result.html)   evalerror: refused evaluate string javascript because 'unsafe-eval' not allowed source of script in following content security policy directive: "default-src *". 

the nginx config:

[..] more_set_headers   "content-security-policy:                 default-src * 'unsafe-eval' 'unsave-inline';                 script-src 'self' 'unsafe-inline' 'unsafe-eval' 'unsafe-inline' https://cdn.raygun.io https://cdn.segment.com https://platform.instagram.com https://www.google-analytics.com https://cdn.mxpnl.com https://maxcdn.bootstrapcdn.com;                 connect-src 'self'  https://api.raygun.io https://api.parse.com https://api.segment.io https://api.mixpanel.com;                 img-src 'self' data: https://*.amazonaws.com https://www.google-analytics.com https://*.akamaihd.net https://www.google.com https://*.licdn.com;                 style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://maxcdn.bootstrapcdn.com;                 font-src 'self' https://fonts.gstatic.com https://maxcdn.bootstrapcdn.com;                 frame-src https://instagram.com"; [..] 

the issue:

it looks content-security-policy set in nginx config not applied. checked headers returned server , are set (including unsafe-inline , unsafe-eval).

the question:

help? or in more detail: else have make chrome render nunjuncks templates?

i looking solution works server side (no chrome plugin).

i missed

<meta http-equiv="content-security-policy" content="default-src *">  

in template, grrrr!


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo