kongjun01 commented on issue #4609:
URL: https://github.com/apache/apisix/issues/4609#issuecomment-881138299


   
   thanks, It is resolved. This is my code for the plugin.
   
   ```
   function _M.rewrite(conf, ctx)
   
       local up_conf = {
           type = "roundrobin",
           nodes = {{ host = 'www.baidu.com', weight = 100 }},
           scheme = 'https',
           hash_on = "vars",
           timeout = {
               connect = 15,
               send = 15,
               read = 15
           }
       }
   
       local route_val = { uri = "/*", host = { 'hao.huhuas.cn' }, id = 
"reverse_baidu", upstream = up_conf }
       ctx.matched_route = { has_domain = true, value = route_val, 
modifiedIndex = 'reverse_baidu' }
   
   end`


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


Reply via email to