tzssangglass commented on issue #6405:
URL: https://github.com/apache/apisix/issues/6405#issuecomment-1047051699


   Reproduction steps:
   
   1. add consumer
   
   ```
   curl --location --request PUT 'http://127.0.0.1:9080/apisix/admin/consumers' 
\
   --header 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' \
   --header 'Content-Type: application/json' \
   --data-raw '{
       "username": "jack",
       "plugins": {
           "key-auth": {
               "key": "auth-jack"
           },
           "proxy-rewrite": {
               "headers": {
                   "X-CONSUMER-ID": "1"
               }
           }
       }
   }'
   ```
   
   2. add routes 
   
   ```
   curl --location --request PUT 'http://127.0.0.1:9080/apisix/admin/routes/1' \
   --header 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' \
   --header 'Content-Type: application/json' \
   --data-raw '{
       "upstream": {
           "nodes": {
               "httpbin.org:80": 1
           },
           "type": "roundrobin"
       },
       "uri": "/get",
       "plugins": {
           "key-auth": {}
       }
   }'
   ```
   
   3. trigger route
   
   ```
   curl --location --request GET '127.0.0.1:9080/get' \
   --header 'apikey: auth-jack'
   
   {
       "args": {},
       "headers": {
           "Accept": "*/*",
           "Accept-Encoding": "gzip, deflate, br",
           "Apikey": "auth-jack",
           "Host": "127.0.0.1",
           "Postman-Token": "c1ac1210-fce9-4e35-91f5-c752ce4dff15",
           "User-Agent": "PostmanRuntime/7.29.0",
           "X-Amzn-Trace-Id": "Root=1-6213bd02-7c52cf461b20d29e1c9e83b7",
           "X-Forwarded-Host": "127.0.0.1"
       },
       "origin": "127.0.0.1, 180.118.91.243",
       "url": "http://127.0.0.1/get";
   }
   ```
   
   the `X-CONSUMER-ID` is indeed not added


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