constness

This commit is contained in:
Girish Ramakrishnan
2022-04-14 17:41:41 -05:00
parent 685bda35b9
commit 05d7a7f496
25 changed files with 75 additions and 77 deletions

View File

@@ -41,7 +41,7 @@ async function authorizeApp(req, res, next) {
}
function attachDockerRequest(req, res, next) {
var options = {
const options = {
socketPath: '/var/run/docker.sock',
method: req.method,
path: req.url,
@@ -143,8 +143,8 @@ async function start() {
// eslint-disable-next-line no-unused-vars
gHttpServer.on('upgrade', function (req, client, head) {
// Create a new tcp connection to the TCP server
var remote = net.connect('/var/run/docker.sock', function () {
var upgradeMessage = req.method + ' ' + req.url + ' HTTP/1.1\r\n' +
const remote = net.connect('/var/run/docker.sock', function () {
let upgradeMessage = req.method + ' ' + req.url + ' HTTP/1.1\r\n' +
`Host: ${req.headers.host}\r\n` +
'Connection: Upgrade\r\n' +
'Upgrade: tcp\r\n';