lingsamuel commented on issue #9570:
URL: https://github.com/apache/apisix/issues/9570#issuecomment-1611035935

   Please give a minimal reproducible example. I can't repro this on my side.
   
   Here is my reproduce way with APISIX  3.2
   1. edit request-id plugin
   ```diff
   function _M.header_filter(conf, ctx)
       if not conf.include_in_response then
           return
       end
   
   +   core.log.info("request-id got route_id: ", ngx.ctx.api_ctx.route_id)
       local headers = ngx.resp.get_headers()
       if not headers[conf.header_name] then
           core.response.set_header(conf.header_name, ctx["request-id-" .. 
conf.header_name])
       end
   end
   ```
   
   2. generate many routes
   
![image](https://github.com/apache/apisix/assets/14567045/d1ef33c7-21ff-4312-8399-e970343dd8da)
   
   3. create a simple route with request-id plugin
   ```bash
   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
           }
       }
   }'
   ```
   
   4. query the route multiple times
   
![image](https://github.com/apache/apisix/assets/14567045/d315ac33-44b7-479b-8bf5-cd7576401784)
   


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