liuhengloveyou commented on a change in pull request #2311:
URL: https://github.com/apache/apisix/pull/2311#discussion_r494814868
##########
File path: t/plugin/redirect.t
##########
@@ -676,3 +676,51 @@ close: 1 nil}
--- no_error_log
[error]
[alert]
+
+
+
+=== TEST 26: add plugin with new uri: /test/add
+--- 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": {
+ "redirect": {
+ "http_to_https": true,
+ "ret_code": 307
+ }
+ },
+ "methods":["POST"],
+ "host": "test.com",
+ "uri": "/hello-https"
+ }]]
+ )
+
+ if code >= 300 then
+ ngx.status = code
+ end
+ ngx.say(body)
+ }
+ }
+--- request
+GET /t
+--- response_body
+passed
+--- no_error_log
+[error]
+
+
+
+=== TEST 27: redirect
+--- request
+POST /hello-https
+--- more_headers
+Host: test.com
+--- response_headers
+Location: https://test.com/hello-https
+--- error_code: 308
+--- no_error_log
+[error]
Review comment:
When the user has a configuration, the value of the user configuration
should be returned
----------------------------------------------------------------
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]