vijay commit

This commit is contained in:
Bill Church 2019-10-09 09:32:45 -04:00
parent 2b7092cc2e
commit 6bc2694887
2 changed files with 3 additions and 21 deletions

File diff suppressed because one or more lines are too long

View file

@ -20,10 +20,9 @@ var allowreauth = false
var sessionLog, sessionFooter, logDate, currentDate, myFile, errorExists
var termid // eslint-disable-line
// change path here and in the /app/server/app.js line 115
var resource = window.location.search
var c_query = resource.substring(1)
var socket = io({ path: '/ssh/socket.io', query: c_query })
var custom_path = '/f5-webssh/socket.io'
var socket = io({ path: custom_path , query: resource.substring(1)})
var term = new Terminal()
const fitAddon = new FitAddon()
// DOM properties
@ -38,28 +37,11 @@ term.focus()
fitAddon.fit()
window.addEventListener('resize', resizeScreen, false)
function resizeScreen () {
fitAddon.fit()
socket.emit('resize', { cols: term.cols, rows: term.rows })
}
// this area seems unneccessary now, tested out in Chrome 77 - bill
//
/* if (document.location.pathname) {
var parts = document.location.pathname.split('/')
var base = parts.slice(0, parts.length - 1).join('/') + '/'
var resource = base.substring(1) + '/ssh/socket.io'
socket = io(null, {
path: '/ssh/socket.io',
resource: resource
})
// socket.connect()
} else {
socket = io('http://localhost:2222', {path: '/ssh/socket.io'})
// socket.connect()
} */
term.onData(data => socket.emit('data', data))
socket.on('data', function (data) {