Commit 95dad4bc authored by Éloïs's avatar Éloïs
Browse files

[enh] automatic add / at begin ws2p path

parent d1b3679b
......@@ -34,6 +34,11 @@ export class WS2PCluster {
}
// Make the path be a string
path = path || ''
// Check that the path starts well with / (added if not)
if (!path.match('/^\//'))
{
path = '/'+path
}
// Choose the web protocol depending on the port
const protocol = port == 443 ? "wss://": "ws://"
return [protocol, host, ':', port, path].join('')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment