Skip to content
Open
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
message: Key-auth plugin "hide_credentials" parameter now removes credentials only in search locations
type: bugfix
scope: Plugin

8 changes: 6 additions & 2 deletions kong/plugins/key-auth/handler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,12 @@ local function do_authentication(conf)
key = v

if conf.hide_credentials then
kong.service.request.clear_query_arg(name)
kong.service.request.clear_header(name)
if conf.key_in_query then
kong.service.request.clear_query_arg(name)
end
if conf.key_in_header then
kong.service.request.clear_header(name)
end

if conf.key_in_body then
if not body then
Expand Down