mirror of
https://github.com/monero-project/monero.git
synced 2025-05-06 14:25:01 -04:00
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)
This commit is contained in:
parent
4061a32082
commit
75742977a8
3 changed files with 26 additions and 14 deletions
|
@ -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) \
|
||||
{ \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue