Skip to content

Commit 92b3ce3

Browse files
expensestomaka
andauthored
Support /dns/ as well as /dns4/ and /dns6/ in the websocket wasm ext impl (#1626)
Co-authored-by: Pierre Krieger <[email protected]>
1 parent 5afc278 commit 92b3ce3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

transports/wasm-ext/src/websockets.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const websocket_transport = () => {
3232
/// Turns a string multiaddress into a WebSockets string URL.
3333
// TODO: support dns addresses as well
3434
const multiaddr_to_ws = (addr) => {
35-
let parsed = addr.match(/^\/(ip4|ip6|dns4|dns6)\/(.*?)\/tcp\/(.*?)\/(ws|wss|x-parity-ws\/(.*)|x-parity-wss\/(.*))$/);
35+
let parsed = addr.match(/^\/(ip4|ip6|dns4|dns6|dns)\/(.*?)\/tcp\/(.*?)\/(ws|wss|x-parity-ws\/(.*)|x-parity-wss\/(.*))$/);
3636
if (parsed != null) {
3737
let proto = 'wss';
3838
if (parsed[4] == 'ws' || parsed[4] == 'x-parity-ws') {

0 commit comments

Comments
 (0)