jamesbarnett91 / tplink-energy-monitor

An energy monitoring dashboard for TP-Link smart plugs
GNU General Public License v3.0
467 stars 104 forks source link

choose web socket scheme based on window.location.protocol #57

Open jar349 opened 5 years ago

jar349 commented 5 years ago

This PR allows the application to be accessed via https by testing the protocol being used as https: and then setting the web socket scheme to wss instead of ws.

For example, I have an nginx server in front of my tplink-energy-monitor app. I was receiving Console errors like this:
image

jar349 commented 5 years ago

confirmed that this PR works: image

Xeroxxx commented 4 years ago

I published an docker image containing all pull requests.

https://hub.docker.com/r/xeroxxx/tplink-energy-monitor