mirror of
https://github.com/bitinflow/server.git
synced 2026-03-13 13:35:53 +00:00
fix handling of new requests for generated client id
This commit is contained in:
@@ -155,7 +155,7 @@ module.exports = function(opt) {
|
|||||||
app.use(app.router);
|
app.use(app.router);
|
||||||
|
|
||||||
app.get('/', function(req, res, next) {
|
app.get('/', function(req, res, next) {
|
||||||
if (!req.query.hasOwnProperty('new')) {
|
if (req.query['new'] === undefined) {
|
||||||
return next();
|
return next();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ test('setup local http server', function(done) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('setup localtunnel client', function(done) {
|
test('setup localtunnel client', function(done) {
|
||||||
|
|
||||||
var client = localtunnel_client.connect({
|
var client = localtunnel_client.connect({
|
||||||
host: 'http://localhost:' + lt_server_port,
|
host: 'http://localhost:' + lt_server_port,
|
||||||
port: test._fake_port
|
port: test._fake_port
|
||||||
@@ -43,7 +44,7 @@ test('setup localtunnel client', function(done) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
client.on('error', function(err) {
|
client.on('error', function(err) {
|
||||||
console.error(err);
|
done(err);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -99,4 +100,3 @@ test('request specific domain', function(done) {
|
|||||||
test('shutdown', function() {
|
test('shutdown', function() {
|
||||||
localtunnel_server.close();
|
localtunnel_server.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user