query string poc

This commit is contained in:
Bill Church 2019-10-03 15:49:17 -05:00
parent 744a09f1f4
commit 5ad0c547d7

View file

@ -20,7 +20,10 @@ 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 socket = io({ path: '/ssh/socket.io' })
var resource = window.location.search
var c_query = resource.substring(1)
var socket = io({ path: '/ssh/socket.io', query: c_query })
var term = new Terminal()
const fitAddon = new FitAddon()
// DOM properties
@ -35,6 +38,7 @@ term.focus()
fitAddon.fit()
window.addEventListener('resize', resizeScreen, false)
function resizeScreen () {
fitAddon.fit()
socket.emit('resize', { cols: term.cols, rows: term.rows })