nanamikon commented on a change in pull request #4152:
URL: https://github.com/apache/apisix/pull/4152#discussion_r622070688
##########
File path: apisix/plugins/redirect.lua
##########
@@ -79,7 +96,21 @@ end
function _M.check_schema(conf)
- return core.schema.check(schema, conf)
+ local ok, err = core.schema.check(schema, conf)
+ if not ok then
+ return false, err
+ end
+
+ if conf.regex_uri and #conf.regex_uri > 0 then
+ local _, _, err = re_sub("/fake_uri", conf.regex_uri[1],
+ conf.regex_uri[2], "jo")
+ if err then
+ return false, "invalid regex_uri(" .. conf.regex_uri[1] ..
+ ", " .. conf.regex_uri[2] .. "): " .. err
Review comment:
ok
--
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]