gulp-server-livereload
gulp-server-livereload copied to clipboard
HTTPS
When I make the server https, I get the following error.
Mixed Content: The page at 'https://localhost:8000/' was loaded over HTTPS, but requested an insecure script 'http://localhost:35729/livereload.js?'. This request has been blocked; the content must be served over HTTPS.
This is my config .pipe(server({ livereload: { enable: true, filter: function (filename, cb) { cb(!(/.(sa|le)ss$|node_modules/.test(filePath))); } }, https: true, fallback: "index.html" }));
The problem is in the code we assume HTTP, see https://github.com/hiddentao/gulp-server-livereload/blob/master/src/index.js#L131
I'll need to fix this to allow for https, perhaps with a config parameter.
Have made the change in 1.7.1. Please try again.
For 1.7.1 there is other issue:
Failed to load resource: net::ERR_SSL_VERSION_OR_CIPHER_MISMATCH https://localhost:35729/livereload.js?
Config:
{ https: true, livereload: true, open: true, proxies: config.proxies }
Environment: Browser: Google Chrome 46.0.2490.86 OS: Windows 7 Node.js: 5.7.0
Yep an SSL certificate is needed that matches localhost:35729. We'll need to update the code to serve out an SSL certificate.
@hiddentao do you already have a timeline when you will be able to provide an SSL cert for the live reload server (port 35729) ? Thank you.
@ChristianWeyer Not at the moment I'm afraid - busy on some other projects. Actually I think what should be added is an option which allows you to specify where the SSL certificate sits. Then you can generate your own certificate. It would be a simpler fix too.
I'll see if I can look at this next week.
Should be fixed in 1.7.4. Please test it out and let me know.