Thanks for the tip nkgm.
Doing that or simply hardcoding my Nitrous URL into a script tag does indeed work to load the livereload.js script, and after today’s Ember CLI update the CSP module isn’t a problem anymore since its in report only mode by default.
The problem then becomes my Live Reload Chrome Extension is stuck on ‘Connecting’. After adding some breakpoints in the livereload.js script at some connection logic like say, line 143
this._uri = "ws" + (this.options.https ? "s" : "") + "://" + this.options.host + ":" + this.options.port + "/livereload";
I can see that
this.options.port is correctly the value I set via the
--live-reload-port option, but
localhost. If I edit the
this.options.host value to my correct Nitrous host the extension connects and Live Reload works as expected finally.
So even if I manually (or dynamically as suggested above) add the correct script tag to the index.html file, the livereload.js script defaults to pointing to localhost for its WebSocket connection.
I think nothing will help me short of a
--live-reload-host option for
ember serve since it seems livereload.js accepts that option. Am I correct in that assumption?