mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 08:03:30 +02:00
Fix default IP in port forwarding.
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user