We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d21e8de commit eb74bd8Copy full SHA for eb74bd8
plugins/out_es/es.c
@@ -890,11 +890,12 @@ static void cb_es_flush(struct flb_event_chunk *event_chunk,
890
flb_http_basic_auth(c, ctx->cloud_user, ctx->cloud_passwd);
891
}
892
else if (ctx->http_api_key) {
893
- header_line = flb_sds_printf(NULL, "ApiKey %s", ctx->http_api_key);
+ header_line = flb_sds_create_size(48);
894
if (header_line == NULL) {
895
flb_plg_error(ctx->ins, "failed to format API key auth header");
896
goto retry;
897
898
+ header_line = flb_sds_printf(&header_line, "ApiKey %s", ctx->http_api_key);
899
900
if (flb_http_add_header(c,
901
FLB_HTTP_HEADER_AUTH, strlen(FLB_HTTP_HEADER_AUTH),
0 commit comments