Skip to content
This repository has been archived by the owner on May 25, 2019. It is now read-only.

Can't get LiveReload working over HTTPS #184

Closed
callumlocke opened this issue Oct 25, 2013 · 4 comments
Closed

Can't get LiveReload working over HTTPS #184

callumlocke opened this issue Oct 25, 2013 · 4 comments
Labels

Comments

@callumlocke
Copy link
Contributor

It's possible to make grunt server run over HTTPS during development (eg, if you need to test CORS-related stuff)... You just add protocol: 'https' to your connect.options in your config.

But then LiveReload doesn't work (I think because you can't document.write a non-HTTPS snippet in an HTTPS page).

There are two components to getting this working: (1) make the live reload server work over HTTPS, and (2) make sure the connect-livereload middleware (which just inserts the snippet) inserts an HTTPS (or protocol-relative) snippet.

I got (2) done by upgrading my grunt-contrib-connect to use the master branch (npm install -D https://github.com/gruntjs/grunt-contrib-connect.git). This fixes the snippet issue.

But I can't seem to get (1) done, even though grunt-contrib-watch seems to have fixed this. My page is correctly requesting https://localhost:35729/livereload.js?snipver=1, but that URL just gives me "SSL connection error".

I upgraded to the master of grunt-contrib-watch to ensure I've got the above-linked fix, but I still get "SSL connection error" when I try to load from the LR server over HTTPS.

I'm pretty sure I just need some way to tell the watch task to run its live reload server with the option protocol: 'https'... I can't work out how to do this though. I tried putting it in connect.livereload.options and in watch.livereload.options, but neither worked.

Any ideas?

@schickling
Copy link

Doesn't seem to work for me as well. Have you figured something out?

@eddiemonge
Copy link
Member

did you pass in the key/cert as stated in: https://github.com/gruntjs/grunt-contrib-watch#optionslivereload ?

@schickling
Copy link

@eddiemonge If you're asking me: yes.

@eddiemonge
Copy link
Member

@callumlocke @schickling I am going to close this issue here and suggest opening up an issue in grunt-contib-watch as any fix would probably need to happen there. Or if gruntjs/grunt-contrib-watch#197 isnt truly fixed, comment and let @shama know

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants