Skip to content

Commit

Permalink
Support /dns/ as well as /dns4/ and /dns6/ in the websocket wasm ext …
Browse files Browse the repository at this point in the history
…impl (#1626)

Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
  • Loading branch information
expenses and tomaka authored Jun 30, 2020
1 parent 5afc278 commit 92b3ce3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion transports/wasm-ext/src/websockets.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const websocket_transport = () => {
/// Turns a string multiaddress into a WebSockets string URL.
// TODO: support dns addresses as well
const multiaddr_to_ws = (addr) => {
let parsed = addr.match(/^\/(ip4|ip6|dns4|dns6)\/(.*?)\/tcp\/(.*?)\/(ws|wss|x-parity-ws\/(.*)|x-parity-wss\/(.*))$/);
let parsed = addr.match(/^\/(ip4|ip6|dns4|dns6|dns)\/(.*?)\/tcp\/(.*?)\/(ws|wss|x-parity-ws\/(.*)|x-parity-wss\/(.*))$/);
if (parsed != null) {
let proto = 'wss';
if (parsed[4] == 'ws' || parsed[4] == 'x-parity-ws') {
Expand Down

0 comments on commit 92b3ce3

Please sign in to comment.