Last active
October 12, 2015 04:58
-
-
Save mplatts/fe396903992cb5c87818 to your computer and use it in GitHub Desktop.
Meteor browser policy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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