Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

Commit

Permalink
fix(livereload): use localhost instead of 0.0.0.0 when injecting live…
Browse files Browse the repository at this point in the history
… reload script (#450)
  • Loading branch information
imgx64 authored and jthoms1 committed Dec 5, 2016
1 parent 8fc1053 commit 7f8a0c3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/dev-server/live-reload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ export function injectLiveReloadScript(content: any, host: string, port: Number)
}

function getLiveReloadScript(host: string, port: Number) {
if (host === '0.0.0.0') {
host = 'localhost';
}
var src = `//${host}:${port}/livereload.js?snipver=1`;
return ` <!-- Ionic Dev Server: Injected LiveReload Script -->\n <script src="${src}" async="" defer=""></script>`;
}

0 comments on commit 7f8a0c3

Please sign in to comment.