Commit ebe677a
Changed files (5)
config/environment.js
@@ -26,8 +26,9 @@ module.exports = function(environment) {
// ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
ENV.APP.LOG_VIEW_LOOKUPS = true;
ENV.contentSecurityPolicy = {
- 'connect-src': "'self' http://localhost:3000"
- }
+ 'connect-src': "'self' http://localhost:3000",
+ 'img-src': "'self' " + process.env.ASSET_HOST,
+ };
}
if (environment === 'test') {
@@ -45,7 +46,7 @@ module.exports = function(environment) {
if (environment === 'production') {
ENV.contentSecurityPolicy = {
'connect-src': "'self' https://www.cakeside.com"
- }
+ };
}
return ENV;
.env.template
@@ -0,0 +1,1 @@
+ASSET_HOST=http://localhost:3000
.gitignore
@@ -15,3 +15,4 @@
/libpeerconnection.log
npm-debug.log
testem.log
+.env
Brocfile.js
@@ -2,7 +2,11 @@
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
-var app = new EmberApp();
+var app = new EmberApp({
+ dotEnv: {
+ clientAllowedKeys: ['ASSET_HOST']
+ }
+});
// Use `app.import` to add additional libraries to the generated
// output files.
package.json
@@ -31,5 +31,8 @@
"ember-export-application-global": "^1.0.0",
"express": "^4.8.5",
"glob": "^4.0.5"
+ },
+ "dependencies": {
+ "ember-cli-dotenv": "^0.3.4"
}
}