aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/include
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-11-27 18:24:29 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-11-27 18:27:24 +0000
commit75742977a8cd765175c1d3e39e2e74d25c6ca774 (patch)
tree11d0d4b2950f3929afde0070a8b4b765183a5a71 /contrib/epee/include
parentMerge pull request #501 (diff)
downloadmonero-75742977a8cd765175c1d3e39e2e74d25c6ca774.tar.xz
core_rpc_server: add a --restricted-rpc option
It does not expose the RPC for commands like start_mining, etc (ie, commands a public node operator might want to be restricted)
Diffstat (limited to 'contrib/epee/include')
-rw-r--r--contrib/epee/include/net/http_server_handlers_map2.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/epee/include/net/http_server_handlers_map2.h b/contrib/epee/include/net/http_server_handlers_map2.h
index f812077f1..a822cce3e 100644
--- a/contrib/epee/include/net/http_server_handlers_map2.h
+++ b/contrib/epee/include/net/http_server_handlers_map2.h
@@ -55,8 +55,8 @@
#define MAP_URI_AUTO_XML2(s_pattern, callback_f, command_type) //TODO: don't think i ever again will use xml - ambiguous and "overtagged" format
-#define MAP_URI_AUTO_JON2(s_pattern, callback_f, command_type) \
- else if(query_info.m_URI == s_pattern) \
+#define MAP_URI_AUTO_JON2_IF(s_pattern, callback_f, command_type, cond) \
+ else if((query_info.m_URI == s_pattern) && (cond)) \
{ \
handled = true; \
uint64_t ticks = misc_utils::get_tick_count(); \
@@ -80,6 +80,8 @@
LOG_PRINT( s_pattern << " processed with " << ticks1-ticks << "/"<< ticks2-ticks1 << "/" << ticks3-ticks2 << "ms", LOG_LEVEL_2); \
}
+#define MAP_URI_AUTO_JON2(s_pattern, callback_f, command_type) MAP_URI_AUTO_JON2_IF(s_pattern, callback_f, command_type, true)
+
#define MAP_URI_AUTO_BIN2(s_pattern, callback_f, command_type) \
else if(query_info.m_URI == s_pattern) \
{ \