aboutsummaryrefslogtreecommitdiff
path: root/api/routes
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2024-12-12 05:28:46 +0200
committerkaotisk <kaotisk@arching-kaos.org>2024-12-12 05:28:46 +0200
commit6dcaab9064863b5642bcc3f96c8395174797923b (patch)
treeb26ecc929078ae2aeac5e73bbc6a95f6039f517a /api/routes
parent5594a436d80061b9bb255f06da21101317abbaaa (diff)
downloadarching-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/routes')
-rw-r--r--api/routes/default/index.js20
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"},
]
}
}));