I suggest you ...

Fix LiveReload to work with https

I get this error in Firefox 13 when loading the page over SSL :

The operation is insecure.
this.socket = new this.WebSocket(this._uri);

403 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Pierre Olivier MartelPierre Olivier Martel shared this idea  ·   ·  Admin →
    planned  ·  Andrey TarantsovAdminAndrey Tarantsov (Founder, LiveReload) responded  · 

    Planning to look into it some time soon.

    The main problem is that livereload.js can be accessed via multiple domain names, and even when it’s on localhost, there’s no way to obtain a trusted SSL certificate for localhost. I do have a few options in mind, though.

    27 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Stefan WrobelStefan Wrobel commented  · 

        To clarify what Jamie said, use rack-livereload and make sure to set :source => :vendored in development.rb like so:

        config.middleware.insert_after(ActionDispatch::Static, Rack::LiveReload, :source => :vendored)

      • Jamie LawrenceJamie Lawrence commented  · 

        FYI: I used this Ruby gem https://github.com/johnbintz/rack-livereload in my project to get around the SSL problems. It basically connects to the livereload server and serves up the javascript through my existing (and SSL enabled) Rails server. Hey, presto!

        Another solution might be to implement the proxying in your web server. i.e., load the livereload.js from your SSL-serving web server which simply proxies the livereload app. I'm sure you could make nginx do this but if you're using Rails then the gem above works well.

      • David Alan HjelleDavid Alan Hjelle commented  · 

        Any updates?

        BTW, I've not tried this, but I wouldn't mind (1) generating a self-signed certificate for a fake domain and (2) adding that domain in /etc/hosts just to avoid the security errors, if that would work.

      ← Previous 1 2 Next →

      Feedback and Knowledge Base