mangoGoForward commented on a change in pull request #6039:
URL: https://github.com/apache/apisix/pull/6039#discussion_r780926146
##########
File path: apisix/plugins/basic-auth.lua
##########
@@ -161,6 +166,11 @@ function _M.rewrite(conf, ctx)
return 401, { message = "Password is error" }
end
+ -- 5. hide `Authentication` request header if `hide_credentials` is `true`
+ if conf.hide_credentials == true then
Review comment:
Done.
##########
File path: docs/en/latest/plugins/basic-auth.md
##########
@@ -39,11 +39,18 @@ For more information on Basic authentication, refer to
[Wiki](https://en.wikiped
## Attributes
+For consumer side:
+
| Name | Type | Requirement | Default | Valid | Description
|
| -------- | ------ | ----------- | ------- | ----- |
----------------------------------------------------------------------------------------------------------------------------------------------------------------
|
| username | string | required | | | Different
`consumer` should have different value which is unique. When different
`consumer` use a same `username`, a request matching exception would be raised.
|
| password | string | required | | | the user's
password
|
-| hide_auth_header | boolean | optional | false | | Whether to
return the Authentication request headers to the upstream.
|
+
+For route side:
+
+| Name | Type | Requirement | Default | Valid | Description
|
+| -------- | ------ | ----------- | ------- | ----- |
----------------------------------------------------------------------------------------------------------------------------------------------------------------
|
+| hide_credentials | boolean | optional | false | | Whether to
return the Authentication request headers to the upstream.
|
Review comment:
Done.
--
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]