You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by we...@apache.org on 2020/09/09 08:12:43 UTC

[apisix] branch master updated: bugfix: serverless plugin not work in header_filter phase (#2148)

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

wenming 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 47d39e7  bugfix: serverless plugin not work in header_filter phase (#2148)
47d39e7 is described below

commit 47d39e7b0eee493b2dfe453d08bf5d785ae6d040
Author: maosy <ma...@gmail.com>
AuthorDate: Wed Sep 9 16:12:32 2020 +0800

    bugfix: serverless plugin not work in header_filter phase (#2148)
---
 apisix/plugins/serverless.lua | 6 +++---
 t/admin/schema.t              | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/apisix/plugins/serverless.lua b/apisix/plugins/serverless.lua
index 0baa30e..8ac5abc 100644
--- a/apisix/plugins/serverless.lua
+++ b/apisix/plugins/serverless.lua
@@ -29,7 +29,7 @@ return function(plugin_name, priority)
             phase = {
                 type = "string",
                 -- the default phase is access
-                enum = {"rewrite", "access", "header_filer", "body_filter",
+                enum = {"rewrite", "access", "header_filter", "body_filter",
                         "log", "balancer"}
             },
             functions = {
@@ -116,8 +116,8 @@ return function(plugin_name, priority)
         call_funcs('balancer', conf, ctx)
     end
 
-    function _M.header_filer(conf, ctx)
-        call_funcs('header_filer', conf, ctx)
+    function _M.header_filter(conf, ctx)
+        call_funcs('header_filter', conf, ctx)
     end
 
     function _M.body_filter(conf, ctx)
diff --git a/t/admin/schema.t b/t/admin/schema.t
index d98b491..cc2e594 100644
--- a/t/admin/schema.t
+++ b/t/admin/schema.t
@@ -157,7 +157,7 @@ location /t {
             [[{
                 "properties": {
                     "phase": {
-                        "enum": ["rewrite", "access", "header_filer", "body_filter", "log", "balancer"],
+                        "enum": ["rewrite", "access", "header_filter", "body_filter", "log", "balancer"],
                         "type": "string"
                     },
                     "functions": {
@@ -197,7 +197,7 @@ location /t {
             [[{
                 "properties": {
                     "phase": {
-                        "enum": ["rewrite", "access", "header_filer", "body_filter", "log", "balancer"],
+                        "enum": ["rewrite", "access", "header_filter", "body_filter", "log", "balancer"],
                         "type": "string"
                     },
                     "functions": {