spacewander commented on a change in pull request #3577:
URL: https://github.com/apache/apisix/pull/3577#discussion_r580014030



##########
File path: apisix/plugins/response-rewrite.lua
##########
@@ -107,6 +143,11 @@ function _M.body_filter(conf, ctx)
 end
 
 function _M.header_filter(conf, ctx)
+    ctx.reponse_rewrite_matched =  vars_matched(conf, ctx)

Review comment:
       Extra space found

##########
File path: t/plugin/response-rewrite.t
##########
@@ -509,3 +509,96 @@ GET /t
 additional properties forbidden, found invalid_att
 --- no_error_log
 [error]
+
+
+
+=== TEST 17: add validate vars
+--- config
+    location /t {
+        content_by_lua_block {
+            local plugin = require("apisix.plugins.response-rewrite")
+            local ok, err = plugin.check_schema({
+                vars = {
+                    {"status","==",200}

Review comment:
       Need a case fails to validate, as the successful case is already covered 
later.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to