You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 25, 2019. It is now read-only.
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?
The text was updated successfully, but these errors were encountered:
@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
It's possible to make
grunt server
run over HTTPS during development (eg, if you need to test CORS-related stuff)... You just addprotocol: 'https'
to yourconnect.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 optionprotocol: 'https'
... I can't work out how to do this though. I tried putting it inconnect.livereload.options
and inwatch.livereload.options
, but neither worked.Any ideas?
The text was updated successfully, but these errors were encountered: