Hazel6869 commented on issue #8290: URL: https://github.com/apache/apisix/issues/8290#issuecomment-1309720075
@chyoong Hi, I have experiment, it has worked `curl http://127.0.0.1:9080/apisix/admin/routes/1 \ -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d ' { "uri": "/*", "plugins": { "traffic-split": { "rules": [ { "match": [ { "vars": [ ["cookie_env","==","a"] ] } ], "weighted_upstreams": [ { "upstream": { "name": "upstream-B", "type": "roundrobin", "pass_host": "node", "nodes": { "www.baidu.com:80": 1 } }, "weight": 3 } ] } ] } }, "upstream": { "type": "roundrobin", "nodes": { "httpbin.org": 1 } } }' curl -X GET http://127.0.0.1:9080 -v //visit httpbin curl -X GET http://127.0.0.1:9080 -H 'Cookie: env=a' -v //visit baidu` -- 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]
