fix missing query parsing in server

This commit is contained in:
Roman Shtylman
2012-12-17 14:31:05 -05:00
parent 79ca069c38
commit 5c6558ed91

View File

@@ -134,6 +134,8 @@ var handle_req = function (req, res) {
return proxy_request(client, req, res); return proxy_request(client, req, res);
} }
var parsed = url.parse(req.url, true);
// redirect main page to github reference // redirect main page to github reference
if (req.url === '/' && !parsed.query.new) { if (req.url === '/' && !parsed.query.new) {
res.writeHead(301, { Location: 'http://shtylman.github.com/localtunnel/' }); res.writeHead(301, { Location: 'http://shtylman.github.com/localtunnel/' });