-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
webrepl: Doesn't work from https site #5266
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
Comments
Hi @jimmo
I have a working version of this (both WebREPL and File Transfer) for MicroPython (and Python too, to test it) I think the changes are minimal so as soon as #5543 is solved Websocket "secure" for WebREPL and file transfers would be available.
I don't know how this would work with https://micropython.org/webrepl/ but since its from a web browser I guess it would need a certificate signed by a CA and not a self-signed certificate (as the ones I used) and modify If there is interest in this I could write a post on the forum or do a PR to discuss the code additions and decide the best way to implement it. 👍 |
Great! Thanks for looking into this. Putting a PR together sounds like a good way forward. I didn't think any changes would be required for https://micropython.org/webrepl/ -- just changing the URL to start with If you can send a PR then I can test it out and find out. |
PR done! #5611
It tries to connect but all I get is Anyway, I included in the PR a Websocket Python class ('pure' python, no external dependencies), The steps would be:
|
Slightly off topic and I sent this to contact@micropython.org almost a year ago and it still hasn't been fixed. The http://micropython.org/webrepl/ has been redirecting for me to https, has this been happening for everyone? |
Looks like HSTS is enabled on micropython.org/webrepl/ now, so the workaround to use http isn't available. |
Who runs micropython.org? Should be able to turn it off for a page or put it on a subdomain or build micropython to support https ;) |
See #8931 for an implementation of this. |
Interesting… thanks for the work on this! |
Fixed by 924e55a |
webrepl serves on a unencrypted websocket, which means that it can't be accessed from a page served over https.
The simple workaround is to manually ensure that you use http://micropython.org/webrepl/ instead of https://micropython.org/webrepl/
Some ideas to improve this:
The text was updated successfully, but these errors were encountered: