Search code examples
ember.jsember-cli

How to deal with ember-cli Content Security Policy warnings


Thats what I do:

sudo npm install -g ember-cli
ember new my-app
cd my-app
ember server

If I access this server from another computer from LAN with a web browser I get some 'Content Security Policy' warnings and nothing works.


Solution

  • I finally found the related docs.

    ember-cli-content-security-policy is an addon that apparently comes with Ember out of the box. By default it only sends Content-Security-Policy-Report-Only which don't actually block anything but you get warnings in the console.

    This means you don't have to configure anything to access your ember server from LAN. The reason why nothing worked for me was a stupid mistake in a route. Because of my lack of understanding of CSP I associated the *nothing works* with these Content Security Policy warnings.

    Thanks for your support.