Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bospoort opened this issue Oct 12, 2017 · 0 comments
Open

Comments

@bospoort
Copy link

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

  • OS platform and version: Windows 10
  • Node Version: 8.6
  • NPM package version or commit ID:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants