# Why add domain in \`ember-cli-content-security-policy\` and not in \`ember-cli-inject-live-reload\`?

**URL:** <https://discuss.emberjs.com/t/why-add-domain-in-ember-cli-content-security-policy-and-not-in-ember-cli-inject-live-reload/6523>\
**Category:** Ember CLI\
**Created:** [October 19, 2014, 10:59am UTC](https://discuss.emberjs.com/t/why-add-domain-in-ember-cli-content-security-policy-and-not-in-ember-cli-inject-live-reload/6523 "2014-10-19T10:59:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![broerse](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/broerse/32/9497_2.png) [@broerse](https://discuss.emberjs.com/u/broerse)\
**Post date:** [October 19, 2014, 10:59am UTC](https://discuss.emberjs.com/t/why-add-domain-in-ember-cli-content-security-policy-and-not-in-ember-cli-inject-live-reload/6523/1 "2014-10-19T10:59:39Z")

</div>

Why is this:

```nohighlight
if (options.liveReload) {
  ['localhost', '0.0.0.0'].forEach(function(host) {
    headerConfig['connect-src'] = headerConfig['connect-src'] + ' ws://' + host + ':' + options.liveReloadPort;
    headerConfig['script-src'] = headerConfig['script-src'] + ' ' + host + ':' + options.liveReloadPort;
  });
}

```

done in `ember-cli-content-security-policy` and not in `ember-cli-inject-live-reload` ? I ask this because it is seems more logical to me to let it be inserted by the module that uses the external `connect-src`. I like in :

> <https://github.com/broerse/ember-cli-blog/blob/master/app/adapters/application.js>

EmberPouch to inject the domains in `connect-src`. This seems better to me than adding `if (options.liveReload) ` and `if (options.EmberPouch) ` to the `ember-cli-content-security-policy`. Perhaps it done for booting `ember-cli-content-security-policy` and will it move in the future so all adapter makers can do inject `connect-src` the same way as `ember-cli-inject-live-reload`. If you do it by hand in your config environment it works as long as the adapter uses static domains/ports. I have no problem with the current setup but was just wondering why.
