monkeyDluffy6017 commented on code in PR #9194:
URL: https://github.com/apache/apisix/pull/9194#discussion_r1179842495
##########
t/plugin/proxy-rewrite3.t:
##########
@@ -771,3 +771,127 @@ passed
GET /test/plugin/proxy/rewrite HTTP/1.1
--- response_headers
X-Request-ID: test1///test2
+
+
+
+=== TEST 33: setting multiple regex_uris
+--- config
+ location /t {
+ content_by_lua_block {
+ local t = require("lib.test_admin").test
+ local code, body = t('/apisix/admin/routes/1',
+ ngx.HTTP_PUT,
+ [[{
+ "plugins": {
+ "proxy-rewrite": {
+ "regex_uri": [
+ "^/test/(.*)/(.*)/(.*)/hello",
+ "/hello/$1_$2_$3",
+ "^/test/(.*)/(.*)/(.*)/world",
+ "/world/$1_$2_$3"
+ ]
+ }
+ },
+ "upstream": {
+ "nodes": {
+ "127.0.0.1:8125": 1
+ },
+ "type": "roundrobin"
+ },
+ "uri": "/test/*"
+ }]]
+ )
+
+ if code >= 300 then
+ ngx.status = code
+ end
+ ngx.say(body)
+ }
+ }
+--- request
+GET /t
+--- response_body
+passed
+
+
+
+=== TEST 34: hit
+--- request
+GET /test/plugin/proxy/rewrite/hello HTTP/1.1
+--- http_config
+ server {
+ listen 8125;
Review Comment:
I think he's following the other test cases in this test case file
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]