Skip to content

Commit

Permalink
correct spell problem
Browse files Browse the repository at this point in the history
  • Loading branch information
An-DJ committed Mar 30, 2023
1 parent 805edce commit 7665604
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions apisix/admin/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ local function check_token(ctx)
local local_conf = core.config.local_conf()

-- check if admin_key is required
if not local_conf.deployment.admin.admin_key_required then
if local_conf.deployment.admin.admin_key_required == false then
return true
end

Expand Down Expand Up @@ -402,7 +402,7 @@ function _M.init_worker()

if ngx_worker_id() == 0 then
-- check if admin_key is required
if not local_conf.deployment.admin.admin_key_required then
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 it and set a secure password for the admin Key!")
Expand Down
2 changes: 1 addition & 1 deletion apisix/cli/ops.lua
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ local function init(env)
checked_admin_key = true
end
-- check if admin_key is required
if not yaml_conf.deployment.admin.admin_key_required then
if yaml_conf.deployment.admin.admin_key_required == false then
checked_admin_key = true
print("Warning! Admin key is bypassed! "
.. "If you are deploying APISIX in a production environment, "
Expand Down
2 changes: 1 addition & 1 deletion conf/config-default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ deployment:
admin:
# admin_key required or not. Default value is true.
# Bypass the Admin API authentication by modifying this value to false if needed.
admin_key_required: true
# admin_key_required: true

# Default token when use API to call for Admin API.
# *NOTE*: Highly recommended to modify this value to protect APISIX's Admin API.
Expand Down
2 changes: 1 addition & 1 deletion t/cli/test_admin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ deployment:
make init > output.log 2>&1 | true

if grep -E "path[deployment->admin->admin_key_required] expect: boolean, but got: string" output.log > /dev/null; then
echo "failed: should show 'expect: boolean, but got: string'"
echo "check admin_key_required value failed: should show 'expect: boolean, but got: string'"
exit 1
fi

Expand Down

0 comments on commit 7665604

Please sign in to comment.