var minisrv_service_file = true; WTVAdmin = require(classPath + "/WTVAdmin.js") var wtva = new WTVAdmin(minisrv_config, socket, service_name); var auth = wtva.isAuthorized(); if (auth === true) { var password = null; if (request_headers.authorization) { var authheader = request_headers.authorization.split(' '); console.log(request_headers) if (authheader[0] == "Basic") { password = Buffer.from(authheader[1], 'base64').toString(); password = password.split(':')[1]; } } if (wtva.checkPassword(password)) { headers = `200 OK Content-Type: text/html` htmlhead = `
Welcome to the zefie minisrv v${minisrv_config.version} Account Administration
`; data = htmlhead; data += `Please select an option to get started: