diff options
author | Riccardo Spagni <ric@spagni.net> | 2016-09-18 21:38:46 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2016-09-18 21:38:46 +0200 |
commit | 53e18cafdfb2bf24e8e0f8dd7355733eb31dc1c4 (patch) | |
tree | 55e6ece4dbd5865b373ddbfedaa669bbdbbd25b1 /contrib/epee/include/net/http_server_impl_base.h | |
parent | Merge pull request #1101 (diff) | |
parent | epee: optionally restrict HTTP service to a configurable user agent (diff) | |
download | monero-53e18cafdfb2bf24e8e0f8dd7355733eb31dc1c4.tar.xz |
Merge pull request #1102v0.10.0
eeb2bbc epee: optionally restrict HTTP service to a configurable user agent (moneromooo-monero)
Diffstat (limited to 'contrib/epee/include/net/http_server_impl_base.h')
-rw-r--r-- | contrib/epee/include/net/http_server_impl_base.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/epee/include/net/http_server_impl_base.h b/contrib/epee/include/net/http_server_impl_base.h index 10f74b9a8..65fe5eed6 100644 --- a/contrib/epee/include/net/http_server_impl_base.h +++ b/contrib/epee/include/net/http_server_impl_base.h @@ -52,7 +52,7 @@ namespace epee : m_net_server(external_io_service) {} - bool init(const std::string& bind_port = "0", const std::string& bind_ip = "0.0.0.0") + bool init(const std::string& bind_port = "0", const std::string& bind_ip = "0.0.0.0", const std::string &user_agent = "") { //set self as callback handler @@ -61,6 +61,9 @@ namespace epee //here set folder for hosting reqests m_net_server.get_config_object().m_folder = ""; + // workaround till we get auth/encryption + m_net_server.get_config_object().m_required_user_agent = user_agent; + LOG_PRINT_L0("Binding on " << bind_ip << ":" << bind_port); bool res = m_net_server.init_server(bind_port, bind_ip); if(!res) |