From 522c83b1dbb10bc13ffab1d9cbd9c80c6a3b314d Mon Sep 17 00:00:00 2001 From: jkaplon <jody@kaplon.us> Date: Wed, 13 Jan 2016 18:44:33 -0500 Subject: [PATCH] Add content-type header and JSON.stringify to JSON responder. --- server.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index b3cce54..179aa1f 100644 --- a/server.js +++ b/server.js @@ -184,7 +184,8 @@ app.get('/:loc/status', function(req, res) { if(err) { return winston.error('error running query', err); } - res.send(result.rows[0].origjson); + res.setHeader('Content-Type', 'application/json'); + res.send(JSON.stringify(result.rows[0].origjson)); }); }); }