This commit is contained in:
Barış Soner Uşaklı
2017-04-28 19:35:48 -04:00
parent 59d0815073
commit f3c4d2ebe3
3 changed files with 7 additions and 7 deletions

View File

@@ -130,6 +130,9 @@ function setupExpressApp(app) {
app.use(compression());
app.get('/ping', ping);
app.get('/sping', ping);
setupFavicon(app);
app.use(relativePath + '/apple-touch-icon', middleware.routeTouchIcon);
@@ -157,6 +160,10 @@ function setupExpressApp(app) {
toobusy.interval(parseInt(meta.config.eventLoopInterval, 10) || 500);
}
function ping(req, res) {
res.status(200).send(req.path === '/sping' ? 'healthy' : '200');
}
function setupFavicon(app) {
var faviconPath = meta.config['brand:favicon'] || 'favicon.ico';
faviconPath = path.join(nconf.get('base_dir'), 'public', faviconPath.replace(/assets\/uploads/, 'uploads'));