Commit 47eb321ffd75f51568db7204562dbaa274e07bb5
Prettify output
cel committed on 10/1/2017, 7:42:15 AMParent: d231db10a87ac1fe382c29c1cc72a3ac254a3af5
Files changed
index.js | changed |
index.js | ||
---|---|---|
@@ -299,9 +299,9 @@ | ||
299 | 299 | this.blobsToPush = [] |
300 | 300 | } |
301 | 301 | |
302 | 302 | Req.prototype.serve = function () { |
303 | - console.log(this.req.method, this.req.url, this.req.socket.remoteAddress) | |
303 | + // console.log(this.req.method, this.req.url, this.req.socket.remoteAddress.replace(/^::ffff:/, '')) | |
304 | 304 | var pathname = this.req.url.replace(/\?.*/, '') |
305 | 305 | if (pathname === '/') return this.serveHome() |
306 | 306 | if (pathname === '/bootstrap') return this.serveBootstrap() |
307 | 307 | if (pathname === '/-/whoami') return this.serveWhoami() |
@@ -312,9 +312,9 @@ | ||
312 | 312 | } |
313 | 313 | |
314 | 314 | Req.prototype.respond = function (status, message) { |
315 | 315 | this.res.writeHead(status, {'content-type': 'application/json'}) |
316 | - this.res.end(message && JSON.stringify(message)) | |
316 | + this.res.end(message && JSON.stringify(message, 0, 2)) | |
317 | 317 | } |
318 | 318 | |
319 | 319 | Req.prototype.respondError = function (status, message) { |
320 | 320 | this.respond(status, {error: message}) |
Built with git-ssb-web