membphis commented on issue #2257:
URL: https://github.com/apache/apisix/issues/2257#issuecomment-698095505


   that is a bug. here is the test case. welcome PR to fix it
   
   ```
   === TEST 1: 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
                           }
                       },
                       "uri": "/hello"
                   }]]
                   )
   
               if code >= 300 then
                   ngx.status = code
               end
               ngx.say(body)
           }
       }
   --- request
   GET /t
   --- response_body
   passed
   --- no_error_log
   [error]
   
   
   
   === TEST 2: redirect
   --- request
   GET /hello
   --- response_headers
   Location: /test/add
   --- error_code: 307
   --- no_error_log
   [error]


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