Closed RangoStack closed 1 year ago
@RangoStack Can you elaborate further? In which plugin are you trying to access the route id?
@RangoStack Please use English in the public channel, thx Back to your question, can you provide reproduction steps? How do check the route id is not the ngx.ctx.api_ctx.route_id?
Please give a minimal reproducible example. I can't repro this on my side.
Here is my reproduce way with APISIX 3.2
function _M.header_filter(conf, ctx)
if not conf.include_in_response then
return
end
generate many routes
create a simple route with request-id plugin
curl http://127.0.0.1:9180/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '{
"uri": "/*",
"plugins": {
"request-id": {
}
},
"upstream": {
"type": "roundrobin",
"nodes": {
"baidu.com:80": 1
}
}
}'
query the route multiple times
Due to lack of the reporter's response this issue has been labeled with "no response". It will be close in 3 days if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.
This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.
Description
自定义插件怎么获取到请求的route_id呢? ngx.ctx.api_ctx.route_id这种方式获取到的route_id与实际请求的route_id不一致的情况。
Environment
apisix version
):uname -a
):openresty -V
ornginx -V
):curl http://127.0.0.1:9090/v1/server_info
):luarocks --version
):