Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content Security Policy #2

Open
michaellouieloria opened this issue Nov 29, 2014 · 2 comments
Open

Content Security Policy #2

michaellouieloria opened this issue Nov 29, 2014 · 2 comments

Comments

@michaellouieloria
Copy link

I think you should add in the readme the proper entries for the content security policy because it's causing some errors.

https://atmospherejs.com/meteor/browser-policy package can set the security policies

Sample error message
Refused to execute inline script because it violates the following Content Security Policy

Fix (add in server)
BrowserPolicy.content.allowInlineScripts();
BrowserPolicy.content.allowOriginForAll('.disquscdn.com');
BrowserPolicy.content.allowOriginForAll('
.disqus.com');
BrowserPolicy.content.allowOriginForAll('*.google-analytics.com');

@dvzrd
Copy link

dvzrd commented Feb 27, 2015

Hey, so how did you get browser policy to work with this package?

I'm getting this error every time even though I added the fixes you recommended.

 Refused to load the script 'http://undefined.disqus.com/embed.js' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-inline' http://.disquscdn.com https://.disquscdn.com http://.disqus.com https://.disqus.com http://*.google-analytics.com https://*.google-analytics.com http://fonts.googleapis.com http://fonts.gstatic.com".

Appreciate any help on this, thanks.

@michaellouieloria
Copy link
Author

try adding the other links like

BrowserPolicy.content.allowOriginForAll('.gstatic.com');
BrowserPolicy.content.allowOriginForAll('.googleapis.com');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants