Open grencik opened 4 days ago
this indeed looks like a bug, please share your apisix resource configurations
Consumer:
{
"plugins": {
"key-auth": {
"key": "abcdef"
}
},
"username": "consumer_user"
}
Route:
{
"name": "Some route",
"status": 1,
"plugins": {
"key-auth": {
"_meta": {
"disable": true
},
"hide_credentials": true
},
"body-transformer": {
"request": {
"input_format": "json",
"template_is_base64": true,
"template": "<base64 template>"
}
},
"proxy-rewrite": {
"regex_uri": [
"^/some-route",
"/other-route"
],
"use_real_request_uri_unsafe": false
}
},
"host": "host.example.com",
"methods": [
"GET",
"POST"
],
"uri": "/some-route",
"upstream": {
"scheme": "https",
"type": "roundrobin",
"nodes": [
{
"host": "other-host.example.com",
"weight": 1,
"priority": 0,
"port": 443
}
],
"hash_on": "vars",
"timeout": {
"connect": 6,
"read": 6,
"send": 6
},
"keepalive_pool": {
"idle_timeout": 60,
"requests": 1000,
"size": 320
},
"pass_host": "node"
}
}
Request:
curl --request POST \
--url 'https://host.example.com/some-route?apikey=abcdef' \
--header 'Content-Type: application/json' \
--data '{
"attr1": "value 1",
"attr2": "value 2"
}'
Current Behavior
I have in route key-auth and body-transformer plugins. When key-auth plugin fail ([lua] plugin.lua:1171: run_plugin(): key-auth exits with http status code 401) then body-transformer horibly crash with error
When I remove key-auth plugin or key-auth doesn't fail, it works as expected.
Expected Behavior
It should probably stop executing next plugins or at least body-transformer should have all data to not crash.
Error Logs
Steps to Reproduce
Environment
apisix version
): 3.10.0