sandwich on Nostr: Thanks! While that may appear to support many cases, it doesn't support the case ...
Thanks! While that may appear to support many cases, it doesn't support the case where a relay isn't at root (in a subdirectory). Unset url case is handled here:
https://github.com/sandwichfarm/myrelay.page/blob/main/src/lib/core/MRP.ts#L119-L128
It additionally handles potential issue where someone attempts to connect to `wss` from `http` or vice-versa (would throw client-side errors) by clamping websocket/http SSL in alignment with browser limitations, which is implicitly compatible with onion.
https://github.com/sandwichfarm/myrelay.page/blob/main/src/lib/core/MRP.ts#L119-L128
It additionally handles potential issue where someone attempts to connect to `wss` from `http` or vice-versa (would throw client-side errors) by clamping websocket/http SSL in alignment with browser limitations, which is implicitly compatible with onion.