DEV: Fix duplicate port on livereload (#29771)

Followup to fd5ef6896d
This commit is contained in:
David Taylor 2024-11-14 23:05:47 +00:00 committed by GitHub
parent e9e6774a4f
commit d3caa875be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -98,7 +98,7 @@ function updateScriptReferences({
// ember-cli-live-reload doesn't select ports correctly, so we use _lr/livereload directly
// (important for cloud development environments like GitHub CodeSpaces)
newElements.unshift(
`<script nonce="${nonce}">window.LiveReloadOptions = { "path": "_lr/livereload", "host": location.host, "port": location.port || (location.protocol === "https:" ? 443 : 80) }</script>`,
`<script nonce="${nonce}">window.LiveReloadOptions = { "path": "_lr/livereload", "host": location.hostname, "port": location.port || (location.protocol === "https:" ? 443 : 80) }</script>`,
`<script async src="/_lr/livereload.js" nonce="${nonce}"></script>`
);
}