From d76ea5440a25e76d0aa5d8b3c95a4776be800347 Mon Sep 17 00:00:00 2001 From: Sheogorath Date: Tue, 3 Jul 2018 20:36:40 +0200 Subject: [PATCH] Fixing content types in status router As it turns out, expressjs doesn't detect the right mimetype and it seems like I didn't bother to test this enough. So lets fix it for the next release. Signed-off-by: Sheogorath --- lib/web/statusRouter.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/web/statusRouter.js b/lib/web/statusRouter.js index 256fead0..7ecf3839 100644 --- a/lib/web/statusRouter.js +++ b/lib/web/statusRouter.js @@ -17,7 +17,8 @@ statusRouter.get('/status', function (req, res, next) { realtime.getStatus(function (data) { res.set({ 'Cache-Control': 'private', // only cache by client - 'X-Robots-Tag': 'noindex, nofollow' // prevent crawling + 'X-Robots-Tag': 'noindex, nofollow', // prevent crawling + 'Content-Type': 'application/json' }) res.send(data) }) @@ -101,7 +102,8 @@ statusRouter.get('/config', function (req, res) { } res.set({ 'Cache-Control': 'private', // only cache by client - 'X-Robots-Tag': 'noindex, nofollow' // prevent crawling + 'X-Robots-Tag': 'noindex, nofollow', // prevent crawling + 'Content-Type': 'application/javascript' }) res.render(config.constantsPath, data) })