You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/04/01 06:35:07 UTC

[GitHub] [apisix] tzssangglass commented on a change in pull request #6670: feat: Add the function of hiding header for key-auth plugin

tzssangglass commented on a change in pull request #6670:
URL: https://github.com/apache/apisix/pull/6670#discussion_r840277034



##########
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:
       What is the purpose of doing this?




-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org