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>
This commit is contained in:
parent
4e38d1836e
commit
d76ea5440a
1 changed files with 4 additions and 2 deletions
|
@ -17,7 +17,8 @@ statusRouter.get('/status', function (req, res, next) {
|
||||||
realtime.getStatus(function (data) {
|
realtime.getStatus(function (data) {
|
||||||
res.set({
|
res.set({
|
||||||
'Cache-Control': 'private', // only cache by client
|
'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)
|
res.send(data)
|
||||||
})
|
})
|
||||||
|
@ -101,7 +102,8 @@ statusRouter.get('/config', function (req, res) {
|
||||||
}
|
}
|
||||||
res.set({
|
res.set({
|
||||||
'Cache-Control': 'private', // only cache by client
|
'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)
|
res.render(config.constantsPath, data)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue