I can't get the websocket to work when the app is on HTTPS and the dev server is on HTTP.
I'm running webpack-dev-server on the default http://localhost:8080
. My app runs on https://myapp.test
and references http://localhost:8080/js/app.js
. This works but when it tries to create the websocket connection it requests it on https://192.168.178.20:8080/...
and that fails:
192.168.178.20
is my local IP address so when I manually change the https
to http
it loads correctly. And if I serve the exact same app over HTTP on http://myapp.test
it's all hunkydory:
Alternatively if I set devServer: { https: true }
in the webpack config that also works but only after I manually accept the self signed certificate.
Isn't there a way to load the socket on an HTTP connection from an HTTPS page?