tzssangglass commented on a change in pull request #6670:
URL: https://github.com/apache/apisix/pull/6670#discussion_r840368606
##########
File path: apisix/plugins/key-auth.lua
##########
@@ -110,6 +114,12 @@ function _M.rewrite(conf, ctx)
end
core.log.info("consumer: ", core.json.delay_encode(consumer))
+ if conf.hide_credentials then
+ core.request.set_header(ctx, conf.header, nil)
+ core.request.get_uri_args(ctx)
+ core.request.set_uri_args(ctx, {})
Review comment:
I think we don't necessary to remove the all query params
If the key is in the header, we only need to delete the key in the headers.
If the key is in the query, we only need to delete the key in the query
params.
cc @spacewander right?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]