gxthrj opened a new issue #4009:
URL: https://github.com/apache/apisix/issues/4009


   ### Issue description
   
   Define a route in APISIX, like this:
   
   ```json
   [
       {
           "modifiedIndex": 109,
           "value": {
               "id": "3fc92fca",
               "desc": "szydpoc_httpbin-route_rule1",
               "status": 1,
               "update_time": 1617873717,
               "uris": [
                   "/ip"
               ],
               "priority": 1,
               "create_time": 1617873717,
               "upstream_id": "d678a7ac"
           },
           "createdIndex": 109,
           "key": "/apisix/routes/3fc92fca"
       },
       {
           "modifiedIndex": 110,
           "value": {
               "vars": [
                   [
                       "cookie_x_foo",
                       "==",
                       "v2"
                   ]
               ],
               "status": 1,
               "id": "a6c07e70",
               "desc": "szydpoc_httpbin-route_rule2",
               "update_time": 1617873717,
               "uris": [
                   "/ip"
               ],
               "create_time": 1617873717,
               "priority": 2,
               "upstream_id": "cd3dc953"
           },
           "createdIndex": 110,
           "key": "/apisix/routes/a6c07e70"
       }
   ]
   ```
   
   use curl to request:
   
   ```shell
   curl -v --cookie "X-Foo=v2" http://127.0.0.1:9080/ip
   ```
   
   The request always hit upstream `d678a7ac`, which is the first route.
   
   
   ### Environment
   
   * apisix version (cmd: `apisix version`): 2.5
   
   


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to