Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jar349
Copy link

@jar349 jar349 commented Nov 12, 2019

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
Copy link
Author

jar349 commented Nov 12, 2019

confirmed that this PR works:
image

@Xeroxxx
Copy link

Xeroxxx commented Apr 22, 2020

I published an docker image containing all pull requests.

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

lumpi2k added a commit to lumpi2k/tplink-energy-monitor that referenced this pull request Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants