From 4904be8bad6781a2fb7a46281e3d17130e27d854 Mon Sep 17 00:00:00 2001 From: Bill Church Date: Sat, 14 Mar 2020 13:16:44 -0400 Subject: [PATCH] chore: update favicon.ico location --- app/client/public/client.htm | 1 + app/client/src/client.htm | 1 + app/server/app.js | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/app/client/public/client.htm b/app/client/public/client.htm index 9558557..e5895ec 100644 --- a/app/client/public/client.htm +++ b/app/client/public/client.htm @@ -6,6 +6,7 @@ html, body {background-color: #000;height: 100%;margin: 0;}.dropup-content {display: none;} +
diff --git a/app/client/src/client.htm b/app/client/src/client.htm index 9558557..e5895ec 100644 --- a/app/client/src/client.htm +++ b/app/client/src/client.htm @@ -6,6 +6,7 @@ html, body {background-color: #000;height: 100%;margin: 0;}.dropup-content {display: none;} +
diff --git a/app/server/app.js b/app/server/app.js index 3c61dbe..c1c4855 100644 --- a/app/server/app.js +++ b/app/server/app.js @@ -117,6 +117,7 @@ var validator = require('validator') var io = require('socket.io')(server, { serveClient: false, path: '/ssh/socket.io' }) var socket = require('./socket') var expressOptions = require('./expressOptions') +var favicon = require('serve-favicon'); // express app.use(session) @@ -127,6 +128,9 @@ app.disable('x-powered-by') // static files app.use('/ssh', express.static(publicPath, expressOptions)) +// favicon from root if being pre-fetched by browser to prevent a 404 +app.use(favicon(path.join(publicPath,'favicon.ico'))); + app.get('/ssh/reauth', function (req, res, next) { var r = req.headers.referer || '/' res.status(401).send('')