diff options
author | Sheogorath | 2018-07-03 20:36:40 +0200 |
---|---|---|
committer | Sheogorath | 2018-07-03 20:38:52 +0200 |
commit | d76ea5440a25e76d0aa5d8b3c95a4776be800347 (patch) | |
tree | 8a3f6badc29c8d5ccd7593c7f89aa5dc203e2f3e /lib/web | |
parent | 4e38d1836e49fb80fecb95726b30cb637e1fbaa6 (diff) |
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 <sheogorath@shivering-isles.com>
Diffstat (limited to '')
-rw-r--r-- | lib/web/statusRouter.js | 6 |
1 files 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) }) |