Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apisix/plugins/elasticsearch-logger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ local http = require("resty.http")
local log_util = require("apisix.utils.log-util")
local bp_manager_mod = require("apisix.utils.batch-processor-manager")
local plugin = require("apisix.plugin")
local fetch_secrets = require("apisix.secret").fetch_secrets
local ngx = ngx
local str_format = core.string.format
local math_random = math.random
Expand Down Expand Up @@ -252,6 +253,7 @@ local function send_to_elasticsearch(conf, entries)
["Accept"] = "application/vnd.elasticsearch+json"
}
if conf.auth then
conf = fetch_secrets(conf, true)
local authorization = "Basic " .. ngx.encode_base64(
conf.auth.username .. ":" .. conf.auth.password
)
Expand Down
Loading