From: Michael Friedrich Date: Fri, 5 Apr 2019 13:08:09 +0000 (+0200) Subject: HttpServerConnection: Log the user agent field for new requests too X-Git-Tag: v2.11.0-rc1~161^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f177d8786d98b2752d4c9ba3ecf7204245176e38;p=icinga2 HttpServerConnection: Log the user agent field for new requests too refs #7041 --- diff --git a/lib/remote/httpserverconnection.cpp b/lib/remote/httpserverconnection.cpp index c06e381e2..53aefc497 100644 --- a/lib/remote/httpserverconnection.cpp +++ b/lib/remote/httpserverconnection.cpp @@ -489,7 +489,9 @@ void HttpServerConnection::ProcessMessages(boost::asio::yield_context yc) Log(LogInformation, "HttpServerConnection") << "Request: " << request.method_string() << ' ' << request.target() << " (from " << m_PeerAddress - << "), user: " << (authenticatedUser ? authenticatedUser->GetName() : "") << ')'; + << "), user: " << (authenticatedUser ? authenticatedUser->GetName() : "") + << ", agent: " << request[http::field::user_agent] << ")."; //operator[] - Returns the value for a field, or "" if it does not exist. + if (!HandleAccessControl(*m_Stream, request, response, yc)) { break;