You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/07/16 02:53:22 UTC
[GitHub] [apisix] kongjun01 commented on issue #4609: request help: Problem forwarding
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org