Bring back CSP

This commit is contained in:
Matthew Dillon 2015-11-12 07:08:14 -07:00
parent 1fe7702430
commit e54c6fcb2f

View file

@ -24,6 +24,15 @@ module.exports = function(environment) {
routeAfterAuthentication: 'protected.compare', routeAfterAuthentication: 'protected.compare',
routeIfAlreadyAuthenticated: 'protected.compare', routeIfAlreadyAuthenticated: 'protected.compare',
}, },
contentSecurityPolicy: {
'default-src': "'none'",
'script-src': "'self'",
'font-src': "'self'",
'connect-src': "'self'",
'img-src': "'self'",
'style-src': "'self' 'unsafe-inline'",
'media-src': "'self'"
}
}; };
var apiURL; var apiURL;
@ -52,6 +61,7 @@ module.exports = function(environment) {
} }
ENV.apiURL = apiURL; ENV.apiURL = apiURL;
ENV.contentSecurityPolicy['connect-src'] = `'self' ${apiURL}`;
return ENV; return ENV;
}; };