From 32df3370e2e19dea2d3fc8312d63661658d9a36b Mon Sep 17 00:00:00 2001 From: John Crepezzi Date: Wed, 14 Dec 2016 14:33:05 -0500 Subject: [PATCH] Fix header name --- lib/document_handler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/document_handler.js b/lib/document_handler.js index 7a1eca0..aac8b4a 100644 --- a/lib/document_handler.js +++ b/lib/document_handler.js @@ -69,7 +69,7 @@ DocumentHandler.prototype.handlePost = function (request, response) { _this.chooseKey(function (key) { _this.store.set(key, buffer, function (res) { if (res) { - var ip = request.headers['X-Forwarded-For'] || request.ip; + var ip = request.headers['x-forwarded-for'] || request.ip; winston.verbose('added document', { key: key, ip: ip }); response.writeHead(200, { 'content-type': 'application/json' }); response.end(JSON.stringify({ key: key }));