chore: update favicon.ico location

This commit is contained in:
Bill Church 2020-03-14 13:16:44 -04:00
parent be3ec6857a
commit 4904be8bad
3 changed files with 6 additions and 0 deletions

View file

@ -6,6 +6,7 @@
html, body {background-color: #000;height: 100%;margin: 0;}.dropup-content {display: none;}
</style>
<link rel="stylesheet" href="/ssh/webssh2.css" />
<link rel="icon" href="/ssh/favicon.ico" />
</head>
<body>
<div class="box">

View file

@ -6,6 +6,7 @@
html, body {background-color: #000;height: 100%;margin: 0;}.dropup-content {display: none;}
</style>
<link rel="stylesheet" href="/ssh/webssh2.css" />
<link rel="icon" href="/ssh/favicon.ico" />
</head>
<body>
<div class="box">

View file

@ -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('<!DOCTYPE html><html><head><meta http-equiv="refresh" content="0; url=' + r + '"></head><body bgcolor="#000"></body></html>')