-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: response-rewrite does not take effect in apisix-openresty #5370
Comments
here is my config:
I remove
you can see the the correct configuration should be
There is an error in the example in this document: https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/response-rewrite.md#how-to-enable, would you like to submit a PR to fix it? just change |
Understood. I modify "200" to 200, |
This has nothing to do with openresty, the vars matching uses the lua-resty-expr library. |
Okay, the problem is solved by clarifying the attribute type. |
Issue description
The response-rewrite sample was configured according to the official document, but the returned content was found not to be modified as expected when the curl xxxxx.
After many tests, the plugin took effect after changing apisix-openresty back to openresty.
Environment
apisix version (cmd:
apisix version
): 2.10.0/2.10.1OS (cmd:
uname -a
):Linux localhost.localdomain 3.10.0-957.10.1.el7.x86_64 2019 x86_64 x86_64 x86_64 GNU/LinuxOpenResty / Nginx version (cmd:
nginx -V
oropenresty -V
):apisix-openresty:openresty/1.19.3.2
openresty:openresty/1.19.3.1 (or 1.19.19.1)
etcd version, if have (cmd: run
curl http://127.0.0.1:9090/v1/server_info
to get the info from server-info API): 3.4.0apisix-dashboard version, if have:
the plugin runner version, if the issue is about a plugin runner (cmd: depended on the kind of runner):
luarocks version, if the issue is about installation (cmd:
luarocks --version
):/bin/luarocks 2.3.0
Steps to reproduce
Actual result
This result return is under apisix-openresty
Error log
no error log
Expected result
This result return is effective under openresty
The text was updated successfully, but these errors were encountered: