gulp-server-livereload icon indicating copy to clipboard operation
gulp-server-livereload copied to clipboard

HTTPS

Open kareljan opened this issue 8 years ago • 8 comments

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" }));

kareljan avatar Feb 26 '16 11:02 kareljan

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.

hiddentao avatar Feb 27 '16 06:02 hiddentao

Have made the change in 1.7.1. Please try again.

hiddentao avatar Feb 29 '16 09:02 hiddentao

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

romamatusevich avatar Mar 02 '16 10:03 romamatusevich

Yep an SSL certificate is needed that matches localhost:35729. We'll need to update the code to serve out an SSL certificate.

hiddentao avatar Mar 08 '16 05:03 hiddentao

@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 avatar Apr 04 '16 13:04 ChristianWeyer

@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.

hiddentao avatar Apr 04 '16 14:04 hiddentao

I'll see if I can look at this next week.

hiddentao avatar Apr 04 '16 14:04 hiddentao

Should be fixed in 1.7.4. Please test it out and let me know.

hiddentao avatar Apr 13 '16 03:04 hiddentao