Azure / azure-relay-node

☁️Node.js library for Azure Relay Hybrid Connections
https://docs.microsoft.com/en-us/azure/service-bus-relay/relay-what-is-it
MIT License
12 stars 15 forks source link

parsing of url is incorrect in server.js for hyco-websocket-tunnel #16

Open bospoort opened 6 years ago

bospoort commented 6 years ago

Actual Behavior

  1. wsServer.on('request') parses the url incorrectly
  2. the (action =='tunnel') is always false since there is no action and nothing is ever equal to 'tunnel'

Expected Behavior

This is what it should be: wsServer.on('request', function(request) { var url = urlParse(request.resource, true); var params = url.query; if (params['sb-hc-action'] === 'accept') { createTunnel(request, params.port, params.host); } else { request.reject(404); } });

Versions