Closed digislayer closed 1 year ago
Hi,
The frontend is actually in the ui
folder of the repository. It's compiled and minified for usage in a C++ library.
Your pull request will be highly appreciated. Here's the file you are looking for: https://github.com/ayushsharma82/WebSerial/blob/master/ui/src/socket.js
Thanks!
Thank you for making this modern utility accessible! Absolute URLs are used in multiple locations of the front-end. This makes the interface inaccessible in several use-cases where the device needs to be behind a NAT(for example, with a reverse-proxy).
Replacing these with relative URLs would make the interface work in such cases.
Example: WebSocket URL is defined in this way: "ws://" + document.location.host + "/webserialws" . document.location.host needs to be replaced here with document.location.host + document.location.port + document.location.pathname.
I could submit a PR with all the required changes, but the front-end is minified and it wouldn't make sense to submit a PR over minified content.