Created
November 6, 2015 08:36
-
-
Save mrloop/41ee14daecaf1873cee0 to your computer and use it in GitHub Desktop.
Generate CSP from ember-cli
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
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