This is an automated email from the ASF dual-hosted git repository.

traky pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new b19fdcf34 fix: rectify the warning printed when `admin_key_required` 
== `false` (#11105)
b19fdcf34 is described below

commit b19fdcf347f0d2bd5b5a06052b39797db9618294
Author: Abhishek Choudhary <[email protected]>
AuthorDate: Sun Apr 7 10:47:46 2024 +0545

    fix: rectify the warning printed when `admin_key_required` == `false` 
(#11105)
---
 apisix/admin/init.lua | 2 +-
 apisix/cli/ops.lua    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/apisix/admin/init.lua b/apisix/admin/init.lua
index 9596a8d62..50685af7a 100644
--- a/apisix/admin/init.lua
+++ b/apisix/admin/init.lua
@@ -463,7 +463,7 @@ function _M.init_worker()
         if local_conf.deployment.admin.admin_key_required == false then
             core.log.warn("Admin key is bypassed! ",
                 "If you are deploying APISIX in a production environment, ",
-                "please disable `admin_key_required` and set a secure admin 
key!")
+                "please enable `admin_key_required` and set a secure admin 
key!")
         end
 
         local ok, err = ngx_timer_at(0, function(premature)
diff --git a/apisix/cli/ops.lua b/apisix/cli/ops.lua
index ee4a811cf..8b2b6a14e 100644
--- a/apisix/cli/ops.lua
+++ b/apisix/cli/ops.lua
@@ -193,7 +193,7 @@ local function init(env)
         checked_admin_key = true
         print("Warning! Admin key is bypassed! "
                 .. "If you are deploying APISIX in a production environment, "
-                .. "please disable `admin_key_required` and set a secure admin 
key!")
+                .. "please enable `admin_key_required` and set a secure admin 
key!")
     end
 
     if yaml_conf.apisix.enable_admin and not checked_admin_key then

Reply via email to