Skip to content

Commit f28e61e

Browse files
cosmo0920edsiper
authored andcommitted
out_splunk: Change attaching priority for HEC token
Signed-off-by: Hiroshi Hatake <[email protected]>
1 parent 3c8f9f2 commit f28e61e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

plugins/out_splunk/splunk.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -962,15 +962,15 @@ static void cb_splunk_flush(struct flb_event_chunk *event_chunk,
962962
if (ctx->http_user && ctx->http_passwd) {
963963
flb_http_basic_auth(c, ctx->http_user, ctx->http_passwd);
964964
}
965+
else if (ctx->auth_header) {
966+
flb_http_add_header(c, "Authorization", 13,
967+
ctx->auth_header, flb_sds_len(ctx->auth_header));
968+
}
965969
else if (metadata_auth_header) {
966970
flb_http_add_header(c, "Authorization", 13,
967971
metadata_auth_header,
968972
flb_sds_len(metadata_auth_header));
969973
}
970-
else if (ctx->auth_header) {
971-
flb_http_add_header(c, "Authorization", 13,
972-
ctx->auth_header, flb_sds_len(ctx->auth_header));
973-
}
974974

975975
/* Append Channel identifier header */
976976
if (ctx->channel) {

0 commit comments

Comments
 (0)