diff --git a/apisix/plugins/key-auth.lua b/apisix/plugins/key-auth.lua index f8cfddae0cf8..7196a13e6da0 100644 --- a/apisix/plugins/key-auth.lua +++ b/apisix/plugins/key-auth.lua @@ -77,7 +77,7 @@ function _M.rewrite(conf, ctx) end if not key then - return 401, {message = "Missing API key found in request"} + return 401, {message = "Missing API key in request"} end local consumer_conf = consumer_mod.plugin(plugin_name) diff --git a/docs/en/latest/plugins/key-auth.md b/docs/en/latest/plugins/key-auth.md index 93705111d5bc..985036640cb0 100644 --- a/docs/en/latest/plugins/key-auth.md +++ b/docs/en/latest/plugins/key-auth.md @@ -141,7 +141,7 @@ curl http://127.0.0.2:9080/index.html -i ``` HTTP/1.1 401 Unauthorized ... -{"message":"Missing API key found in request"} +{"message":"Missing API key in request"} ``` ```shell diff --git a/docs/zh/latest/plugins/key-auth.md b/docs/zh/latest/plugins/key-auth.md index f45b514e30bd..13a08e7d94ee 100644 --- a/docs/zh/latest/plugins/key-auth.md +++ b/docs/zh/latest/plugins/key-auth.md @@ -148,7 +148,7 @@ curl http://127.0.0.2:9080/index.html -i ```shell HTTP/1.1 401 Unauthorized ... -{"message":"Missing API key found in request"} +{"message":"Missing API key in request"} ``` ```shell diff --git a/t/plugin/cors.t b/t/plugin/cors.t index 924a8b1fad6a..79e32513d98e 100644 --- a/t/plugin/cors.t +++ b/t/plugin/cors.t @@ -454,7 +454,7 @@ ExternalHeader1: val ExternalHeader2: val ExternalHeader3: val --- response_body -{"message":"Missing API key found in request"} +{"message":"Missing API key in request"} --- error_code: 401 --- response_headers Access-Control-Allow-Origin: https://sub.domain.com diff --git a/t/plugin/key-auth.t b/t/plugin/key-auth.t index f68fe3088f4d..5c28e6bada99 100644 --- a/t/plugin/key-auth.t +++ b/t/plugin/key-auth.t @@ -173,7 +173,7 @@ apikey: 123 GET /hello --- error_code: 401 --- response_body -{"message":"Missing API key found in request"} +{"message":"Missing API key in request"}