nic-6443 commented on code in PR #12864:
URL: https://github.com/apache/apisix/pull/12864#discussion_r2664306419


##########
apisix/plugins/basic-auth.lua:
##########
@@ -157,15 +160,17 @@ end
 
 
 function _M.rewrite(conf, ctx)
-    local cur_consumer, consumer_conf, err = find_consumer(ctx)
+    local cur_consumer, consumer_conf, err = find_consumer(ctx, conf)
     if not cur_consumer then
         if not conf.anonymous_consumer then
+            core.response.set_header("WWW-Authenticate", "Basic realm='" .. 
(conf.realm or "basic") .. "'")

Review Comment:
   I think we can remove `or "basic"` in here because the default value is 
already specified in the schema.



-- 
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]

Reply via email to