1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 19:42:01 +02:00

Fix default IP in port forwarding.

This commit is contained in:
Simo Kinnunen 2014-06-06 10:57:21 +09:00
parent 1e5ac360ed
commit 92be2f1b59

View file

@ -613,7 +613,7 @@ module.exports = function(options) {
.on('forward.test', function(channel, responseChannel, data) {
joinChannel(responseChannel)
if (!data.targetHost || data.targetHost === 'localhost') {
data.targetHost = ip
data.targetHost = socket.request.ip
}
push.send([
channel
@ -625,7 +625,7 @@ module.exports = function(options) {
})
.on('forward.create', function(channel, responseChannel, data) {
if (!data.targetHost || data.targetHost === 'localhost') {
data.targetHost = ip
data.targetHost = socket.request.ip
}
dbapi.addUserForward(user.email, data)
.then(function() {