fix indentation in outputs_http.cpp

add sample config entry for user-agent variable

Signed-off-by: Marcin Kowalski <marcin.kowalski@assecobs.pl>
This commit is contained in:
Marcin Kowalski 2022-01-13 14:02:28 +00:00 committed by poiana
parent a94e6de458
commit f67e8bdad7
2 changed files with 2 additions and 1 deletions

View File

@ -246,6 +246,7 @@ program_output:
http_output:
enabled: false
url: http://some.url
user_agent: "falcosecurity/falco"
# Falco supports running a gRPC server with two main binding types
# 1. Over the network with mandatory mutual TLS authentication (mTLS)

View File

@ -34,7 +34,7 @@ void falco::outputs::output_http::output(const message *msg)
} else {
slist1 = curl_slist_append(slist1, "Content-Type: text/plain");
}
slist1 = curl_slist_append(slist1, m_oc.options["user_agent"].c_str());
slist1 = curl_slist_append(slist1, m_oc.options["user_agent"].c_str());
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, slist1);
curl_easy_setopt(curl, CURLOPT_URL, m_oc.options["url"].c_str());