diff options
| author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-09-07 21:38:41 +0100 |
|---|---|---|
| committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-09-18 20:32:02 +0100 |
| commit | eeb2bbc0fcc9c5afa2c3aa12915b4d3f31115e56 (patch) | |
| tree | c55799576b49814203891a6688ec2dbdf86b7bcf /src/daemon/main.cpp | |
| parent | 68e6678ab77f6ba731a8517eb3941b4e554acfc5 (diff) | |
| download | monzero-core-eeb2bbc0fcc9c5afa2c3aa12915b4d3f31115e56.tar.gz monzero-core-eeb2bbc0fcc9c5afa2c3aa12915b4d3f31115e56.tar.xz monzero-core-eeb2bbc0fcc9c5afa2c3aa12915b4d3f31115e56.zip | |
epee: optionally restrict HTTP service to a configurable user agent
This is intended to catch traffic coming from a web browser,
so we avoid issues with a web page sending a transfer RPC to
the wallet. Requiring a particular user agent can act as a
simple password scheme, while we wait for 0MQ and proper
authentication to be merged.
Diffstat (limited to 'src/daemon/main.cpp')
| -rw-r--r-- | src/daemon/main.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/daemon/main.cpp b/src/daemon/main.cpp index 93027a5d6..0895e1bf1 100644 --- a/src/daemon/main.cpp +++ b/src/daemon/main.cpp @@ -208,6 +208,7 @@ int main(int argc, char const * argv[]) { rpc_port_str = command_line::get_arg(vm, cryptonote::core_rpc_server::arg_testnet_rpc_bind_port); } + auto user_agent = command_line::get_arg(vm, cryptonote::core_rpc_server::arg_user_agent); uint32_t rpc_ip; uint16_t rpc_port; @@ -222,7 +223,7 @@ int main(int argc, char const * argv[]) return 1; } - daemonize::t_command_server rpc_commands{rpc_ip, rpc_port}; + daemonize::t_command_server rpc_commands{rpc_ip, rpc_port, user_agent}; if (rpc_commands.process_command_vec(command)) { return 0; |
