Skip to content

Commit

Permalink
Merge pull request #9 from joostvunderink/master
Browse files Browse the repository at this point in the history
Now passing the x-iota-api-version header
  • Loading branch information
TimSamshuijzen authored Oct 29, 2017
2 parents dc0395c + 7ac1ee9 commit 59c94a7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/iotaproxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,15 @@ let iotaProxy =
'Content-Type': request.headers['content-type'],
'Content-Length': requestbody.length
};
// Make sure the x-iota-api-version header is also passed along,
// no matter the casing used for this header.
Object.keys(request.headers).forEach(function(key)
{
if (key.toLowerCase() === 'x-iota-api-version')
{
proxyRequestOptions.headers[key] = request.headers[key];
}
});
}

let proxyRequest = http.request(
Expand Down

0 comments on commit 59c94a7

Please sign in to comment.