diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2024-12-12 05:28:46 +0200 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2024-12-12 05:28:46 +0200 |
commit | 6dcaab9064863b5642bcc3f96c8395174797923b (patch) | |
tree | b26ecc929078ae2aeac5e73bbc6a95f6039f517a /api | |
parent | 5594a436d80061b9bb255f06da21101317abbaaa (diff) | |
download | arching-kaos-tools-6dcaab9064863b5642bcc3f96c8395174797923b.tar.gz arching-kaos-tools-6dcaab9064863b5642bcc3f96c8395174797923b.tar.bz2 arching-kaos-tools-6dcaab9064863b5642bcc3f96c8395174797923b.zip |
Welcome JSON message now provides points of entry for each route based on the host that is reached through
Diffstat (limited to 'api')
-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"}, ] } })); |