jiangfucheng commented on issue #9777:
URL: https://github.com/apache/apisix/issues/9777#issuecomment-1621851887
I can't reproduce it, here is my test:
1.set up the route with workflow with right config(via dashboard)
```json
{
"uri": "/*",
"name": "test",
"plugins": {
"workflow": {
"rules": [
{
"actions": [
[
"return",
{
"code": 403
}
]
],
"case": [
[
"uri",
"==",
"/hello/rejected"
]
]
},
{
"actions": [
[
"limit-count",
{
"count": 2,
"rejected_code": 429,
"time_window": 60
}
]
],
"case": [
[
"uri",
"==",
"/hello/v2/appid"
]
]
}
]
}
},
"upstream": {
"nodes": [
{
"host": "127.0.0.1",
"port": 9081,
"weight": 1
}
],
"type": "roundrobin"
},
"status": 1
}
```
2.check the route is working.
```
➜ ~ curl localhost:9080
hello web1%
```
```
➜ ~ curl localhost:9080/hello/rejected -i
HTTP/1.1 403 Forbidden
Date: Wed, 05 Jul 2023 14:11:10 GMT
Content-Type: text/plain; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Server: APISIX/3.3.0
{"error_msg":"rejected by workflow"}
```
3.update workflow plugin with wrong configuration
```
{
"uri": "/*",
"name": "test",
"plugins": {
"workflow": {
"_meta": {
"disable": false
},
"actions": [
[
"return",
{
"code": 500
}
]
],
"case": [
[
"uri",
"==",
"/v1/kv.*"
]
]
}
},
"upstream": {
"nodes": [
{
"host": "127.0.0.1",
"port": 9081,
"weight": 1
}
],
"type": "roundrobin"
},
"status": 1
}
```
4. check if the route is working
```
➜ ~ curl localhost:9080/hello/rejected -i
HTTP/1.1 403 Forbidden
Date: Wed, 05 Jul 2023 14:13:11 GMT
Content-Type: text/plain; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Server: APISIX/3.3.0
{"error_msg":"rejected by workflow"}
➜ ~ curl localhost:9080/v1/kv.1 -i
HTTP/1.1 200 OK
Content-Type: text/plain; charset=utf-8
Content-Length: 10
Connection: keep-alive
Date: Wed, 05 Jul 2023 14:13:19 GMT
Server: APISIX/3.3.0
hello web1%
```
5.remote workflow plugin
```
{
"uri": "/*",
"name": "test",
"upstream": {
"nodes": [
{
"host": "127.0.0.1",
"port": 9081,
"weight": 1
}
],
"type": "roundrobin"
},
"status": 1
}
```
6. check result(it works well)
```
➜ ~ curl localhost:9080/hello/rejected -i
HTTP/1.1 200 OK
Content-Type: text/plain; charset=utf-8
Content-Length: 10
Connection: keep-alive
Date: Wed, 05 Jul 2023 14:14:37 GMT
Server: APISIX/3.3.0
hello web1%
```
--
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]