1

At http://www.ember-cli.com/asset-compilation/ section Fingerprinting and CDN URLs says:

prepend - Default: '' - A string to prepend to all of the assets. Useful for CDN urls like https://subdomain.cloudfront.net/

What if I have a CNAMES that look like https://cdn1.foo.com/, https://cdn2.foo.com/ and https://cdn3.foo.com/ that point to my CDN. What do I need to put in the Brocfile to make this work?

The reason why this approach is recommended, is to take advantage of the number of max connections per host name. (more info on that here Max parallel http connections in a browser?).

Community
  • 1
  • 1
Christian Fazzini
  • 19,613
  • 21
  • 110
  • 215

1 Answers1

0

The way I got this "partially" working on Ember CLI 1.13.X.

I say "partially", because I haven't found a way to cycle across the cdnX urls. i.e. cdn1, cdn2, etc.

In .ember-cli-build.js, I have:

var emberEnv = process.env.EMBER_ENV;

module.exports = function(defaults) {
  var app = new EmberApp(defaults, {
    // Add options here
    fingerprint: {
      enabled: ['production', 'staging'].indexOf(emberEnv) > -1,
      prepend: 'https://cdn1' + (emberEnv === 'staging' ? '-staging' : '') + '.site-name.com/dist/team/'
    }
  });
  ...
Christian Fazzini
  • 19,613
  • 21
  • 110
  • 215