Bans for RPC connections

Make bans control RPC sessions too. And auto-ban some bad requests.
Drops HTTP connections whenever response code is 500.
This commit is contained in:
Howard Chu 2019-06-13 08:47:06 +01:00
parent 6335509727
commit a182df21d0
No known key found for this signature in database
GPG key ID: FD2A70B44AB11BA7
5 changed files with 32 additions and 2 deletions

View file

@ -577,6 +577,10 @@ namespace net_utils
if (query_info.m_http_method != http::http_method_options)
{
res = handle_request(query_info, response);
if (response.m_response_code == 500)
{
m_want_close = true; // close on all "Internal server error"s
}
}
else
{