Open doubaozia opened 6 years ago
if use proxy like ngrok, the livereload.js will load from location.hostname, but it not exist. for example, i use ngrok map http://localhost:7001 to https://009c4b13.ngrok.io/, but connect-livereload will use the hostname as where the livereload.js serves "https://009c4b13.ngrok.io/:35729", actually it should be load from "http://localhost:35729". if the default hostname shoud be removed:
change: var src = opt.src || "//' + (location.hostname || '" + hostname + "') + ':" + port + "/livereload.js?snipver=1"; to var src = opt.src || "//' + ('" + hostname + "') + ':" + port + "/livereload.js?snipver=1";
var src = opt.src || "//' + (location.hostname || '" + hostname + "') + ':" + port + "/livereload.js?snipver=1";
var src = opt.src || "//' + ('" + hostname + "') + ':" + port + "/livereload.js?snipver=1";
if use proxy like ngrok, the livereload.js will load from location.hostname, but it not exist. for example, i use ngrok map http://localhost:7001 to https://009c4b13.ngrok.io/, but connect-livereload will use the hostname as where the livereload.js serves "https://009c4b13.ngrok.io/:35729", actually it should be load from "http://localhost:35729". if the default hostname shoud be removed:
change:
var src = opt.src || "//' + (location.hostname || '" + hostname + "') + ':" + port + "/livereload.js?snipver=1";
tovar src = opt.src || "//' + ('" + hostname + "') + ':" + port + "/livereload.js?snipver=1";