Would be better if Rack-LiveReload didn't use a hard IP address
Opened this issue · 0 comments
NathanBowers commented
Please consider embedding the LiveReload script the way LiveReload app itself advises:
<script>document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1"></' + 'script>')</script>
Currently Rack embeds the script with a hard 0.0.0.0 IP address, and this doesn't work when testing with mobile devices over my WiFi network (because mobile devices browse to my Mac's network IP, not 0.0.0.0).
Merely specifying an IP in config.rb isn't optimal because my Mac's IP changes depending on whether I'm home or at work.