From d130958050d54f901685c4d0d0df686343add470 Mon Sep 17 00:00:00 2001 From: wutno Date: Tue, 30 Jan 2018 20:21:40 -0500 Subject: [PATCH] API does not set the proper header --- libs/api.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/api.js b/libs/api.js index 3a433ab..9226dd8 100644 --- a/libs/api.js +++ b/libs/api.js @@ -15,9 +15,11 @@ module.exports = function(logger, portalConfig, poolConfigs){ this.handleApiRequest = function(req, res, next){ switch(req.params.method){ case 'stats': + res.writeHead(200, { 'Content-Type: application/json' }); res.end(portalStats.statsString); return; case 'pool_stats': + res.writeHead(200, { 'Content-Type: application/json' }); res.end(JSON.stringify(portalStats.statPoolHistory)); return; case 'live_stats': @@ -51,4 +53,4 @@ module.exports = function(logger, portalConfig, poolConfigs){ } }; -}; \ No newline at end of file +};