mirror of
https://github.com/seejohnrun/haste-server.git
synced 2024-11-01 11:31:22 +00:00
Fix header name
This commit is contained in:
parent
d81195856a
commit
32df3370e2
1 changed files with 1 additions and 1 deletions
|
@ -69,7 +69,7 @@ DocumentHandler.prototype.handlePost = function (request, response) {
|
||||||
_this.chooseKey(function (key) {
|
_this.chooseKey(function (key) {
|
||||||
_this.store.set(key, buffer, function (res) {
|
_this.store.set(key, buffer, function (res) {
|
||||||
if (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 });
|
winston.verbose('added document', { key: key, ip: ip });
|
||||||
response.writeHead(200, { 'content-type': 'application/json' });
|
response.writeHead(200, { 'content-type': 'application/json' });
|
||||||
response.end(JSON.stringify({ key: key }));
|
response.end(JSON.stringify({ key: key }));
|
||||||
|
|
Loading…
Reference in a new issue