Skip to content

Instantly share code, notes, and snippets.

@balinterdi
Created October 8, 2015 19:23
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 balinterdi/f0e1e5f9b90322a7ef81 to your computer and use it in GitHub Desktop.
Save balinterdi/f0e1e5f9b90322a7ef81 to your computer and use it in GitHub Desktop.
CSP for Ember apps
/* jshint node: true */
const contentSecurityPolicy = {
'default-src': "'none'",
'script-src': "'self'",
'font-src': "'self'",
'connect-src': "'self' localhost:*",
'img-src': "'self'",
'style-src': "'self' 'unsafe-inline'",
'media-src': "'self'"
};
module.exports = function(environment) {
var ENV = {
(...)
contentSecurityPolicy: contentSecurityPolicy
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment