Skip to content

Instantly share code, notes, and snippets.

@mrloop
Created November 6, 2015 08:36
Show Gist options
  • Save mrloop/41ee14daecaf1873cee0 to your computer and use it in GitHub Desktop.
Save mrloop/41ee14daecaf1873cee0 to your computer and use it in GitHub Desktop.
Generate CSP from ember-cli
env = require('./config/environment.js')
var args = process.argv.slice(2);
var contentSecurityPolicy = env(args[0]).contentSecurityPolicy;
cspStr = '';
for (var key in contentSecurityPolicy ){
cspStr = cspStr + key + " " + contentSecurityPolicy[key] + "; ";
}
console.log(cspStr);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment