Current Behavior
Hi, I would also like to use nginx sub_filter in apisix, but it still doesn't work when I use it in apache/apisix:2.99.0-debian,and I see an identical issue and have been merged,there #5451
Expected Behavior
Before content:
<head>
<title>test</title>
<meta charset="utf-8">
</head>
ideally, use the content after filter:
<head>
<title>test</title>
<meta charset="utf-8">
<script>console.log(1)</script>
</head>
However, it does not take effect
Error Logs
No response
Steps to Reproduce
- Use docker-compose deployment
- In the
plugin/market path, enable the response-rewrite plugin
- configuration parameters are as follows
{
"disable": false,
"filters": [
{
"regex": "</head>",
"replace": "<script>console.log(1)</script></head>",
"scope": "global"
}
],
"headers": {
"set": {
"x-powered-by": "",
"x-server-balancer_addr": "$balancer_ip:$balancer_port"
}
},
"vars": [
[
"status",
"==",
200
],
[
"content-type",
"==",
"text/html; charset=utf-8"
]
]
}
Environment
- APISIX version (run
apisix version): apache/apisix:2.99.0-debian
- APISIX Dashboard version, if relevant: apache/apisix-dashboard:2.13-alpine
Current Behavior
Hi, I would also like to use nginx sub_filter in apisix, but it still doesn't work when I use it in apache/apisix:2.99.0-debian,and I see an identical issue and have been merged,there #5451
Expected Behavior
Before content:
ideally, use the content after
filter:However, it does not take effect
Error Logs
No response
Steps to Reproduce
plugin/marketpath, enable theresponse-rewriteplugin{ "disable": false, "filters": [ { "regex": "</head>", "replace": "<script>console.log(1)</script></head>", "scope": "global" } ], "headers": { "set": { "x-powered-by": "", "x-server-balancer_addr": "$balancer_ip:$balancer_port" } }, "vars": [ [ "status", "==", 200 ], [ "content-type", "==", "text/html; charset=utf-8" ] ] }Environment
apisix version): apache/apisix:2.99.0-debian