chainpoint / chainpoint-gateway

Chainpoint Gateway
https://chainpoint.org
Apache License 2.0
27 stars 12 forks source link

Adding additional metadata to the response of a POST /hashes #20

Closed michael-iglesias closed 6 years ago

michael-iglesias commented 6 years ago

Ability to specify a CHAINPOINT_NODE_PRIVATE_URI env var that is to be used in conjunction with the additional metadata included in the response body of any call to POST /hashes when a corresponding CHAINPOINT_NODE_REFLECTED_URI env variable is also set.

Code Changes

Test Cases

Steps to Test

  1. Add an env variable "CHAINPOINT_NODE_PRIVATE_URI" with a valid RFC1918 IP Address
  2. Add an env variable "CHAINPOINT_NODE_REFLECTED_URI" with a value of "public" or "private"
  3. Make a CURL request to POST /hashes and assert that a new property labeled "uri" has been included in the "meta" nested object of the response body
grempe commented 6 years ago

Merged. Thanks @michael-iglesias