diff --git a/server.js b/server.js index 80f5cf5..e940e35 100644 --- a/server.js +++ b/server.js @@ -249,9 +249,10 @@ class Server extends EventEmitter { } if (req.url === '/stats.json' || req.headers.accept === 'application/json') { - res.write(JSON.stringify(stats)) - res.end() + res.setHeader('Content-Type', 'application/json') + res.end(JSON.stringify(stats)) } else if (req.url === '/stats') { + res.setHeader('Content-Type', 'text/html'); res.end(`