Skip to content

Instantly share code, notes, and snippets.

@mplatts
Last active October 12, 2015 04:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mplatts/fe396903992cb5c87818 to your computer and use it in GitHub Desktop.
Save mplatts/fe396903992cb5c87818 to your computer and use it in GitHub Desktop.
Meteor browser policy
// First install the browser policy package:
// meteor add browser-policy
BrowserPolicy.framing.disallow();
BrowserPolicy.content.disallowInlineScripts();
BrowserPolicy.content.disallowEval();
BrowserPolicy.content.allowInlineStyles();
BrowserPolicy.content.allowFontDataUrl();
// Change these to whatever services your app needs access to
trusted = [
'*.google-analytics.com',
'*.googleapis.com',
'*.gstatic.com',
'*.stripe.com',
'*.facebook.com',
'*.akamaihd.net',
'*.github.com',
'*.disquscdn.com',
'*.cloudfront.net'
];
_.each(trusted, function(origin) {
return BrowserPolicy.content.allowOriginForAll(origin);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment