Would be better if Rack-LiveReload didn't use a hard IP address #54

Open
opened 2014-04-04 06:07:05 +00:00 by NathanBowers · 0 comments
NathanBowers commented 2014-04-04 06:07:05 +00:00 (Migrated from github.com)

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.

Please consider embedding the LiveReload script the way LiveReload app itself advises: &lt;script&gt;document.write('&lt;script src=&quot;http://' + (location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1&quot;&gt;&lt;/' + 'script&gt;')&lt;/script&gt; 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.
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: github-migration/rack-livereload#54
No description provided.