diff options
Diffstat (limited to 'api/routes/default/index.js')
-rw-r--r-- | api/routes/default/index.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/api/routes/default/index.js b/api/routes/default/index.js index 6cdb5f4..c9f6bd3 100644 --- a/api/routes/default/index.js +++ b/api/routes/default/index.js @@ -9,18 +9,18 @@ module.exports = (req, res) => { routes:{ GET:[ - {welcome:settings.DEF_PROTO+"["+settings.LOCAL_IP+"]:"+settings.PORT+"/"}, - {gathered_zblocks:settings.DEF_PROTO+"["+settings.LOCAL_IP+"]:"+settings.PORT+settings.URL_PREFIX+"/see"}, - {node_local_chain:settings.DEF_PROTO+"["+settings.LOCAL_IP+"]:"+settings.PORT+settings.URL_PREFIX+"/chain"}, - {node_local_peers:settings.DEF_PROTO+"["+settings.LOCAL_IP+"]:"+settings.PORT+settings.URL_PREFIX+"/peers"}, - {node_local_info:settings.DEF_PROTO+"["+settings.LOCAL_IP+"]:"+settings.PORT+settings.URL_PREFIX+"/node_info"}, - {node_local_zlatest:settings.DEF_PROTO+"["+settings.LOCAL_IP+"]:"+settings.PORT+settings.URL_PREFIX+"/zlatest"}, - {latest_known_mined_block:settings.DEF_PROTO+"["+settings.LOCAL_IP+"]:"+settings.PORT+settings.URL_PREFIX+"/slatest"}, - {show_mined_block:settings.DEF_PROTO+"["+settings.LOCAL_IP+"]:"+settings.PORT+settings.URL_PREFIX+"/sblock"}, - {getMerkleTree:settings.DEF_PROTO+"["+settings.LOCAL_IP+"]:"+settings.PORT+settings.URL_PREFIX+"/mrk/:mkr"}, + {welcome:settings.DEF_PROTO+req.headers.host+"/"}, + {gathered_zblocks:settings.DEF_PROTO+req.headers.host+settings.URL_PREFIX+"/see"}, + {node_local_chain:settings.DEF_PROTO+req.headers.host+settings.URL_PREFIX+"/chain"}, + {node_local_peers:settings.DEF_PROTO+req.headers.host+settings.URL_PREFIX+"/peers"}, + {node_local_info:settings.DEF_PROTO+req.headers.host+settings.URL_PREFIX+"/node_info"}, + {node_local_zlatest:settings.DEF_PROTO+req.headers.host+settings.URL_PREFIX+"/zlatest"}, + {latest_known_mined_block:settings.DEF_PROTO+req.headers.host+settings.URL_PREFIX+"/slatest"}, + {show_mined_block:settings.DEF_PROTO+req.headers.host+settings.URL_PREFIX+"/sblock"}, + {getMerkleTree:settings.DEF_PROTO+req.headers.host+settings.URL_PREFIX+"/mrk/:mkr"}, ], POST:[ - {send_me_a_zblock:settings.DEF_PROTO+"["+settings.LOCAL_IP+"]:"+settings.PORT+settings.URL_PREFIX+"/announce/zblock"}, + {send_me_a_zblock:settings.DEF_PROTO+req.headers.host+settings.URL_PREFIX+"/announce/zblock"}, ] } })); |