-
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: stand alone mode proxy-rewrite headers has bug #1604
Comments
@membphis please take a look |
@andyindr please provide a fully config of we need it . |
we need to check schema after we got the conf, here is an example: if data_valid and self.item_schema then
data_valid, err = check_schema(self.item_schema, item.value)
if not data_valid then
log.error("failed to check item data of [", self.key,
"] err:", err, " ,val: ", json.encode(item.value))
end
end Here is the code for config_etcd: |
and we need to update this file: https://github.com/apache/incubator-apisix/blob/master/apisix/core/config_yaml.lua @nic-chen do you have time to fix this bug? |
@membphis I have resolved this bug. pls assign it to me |
@wrl96 please feel free to submit your PR, waiting for it ^_^ |
Fixed by #2856 |
Issue description
under stand alone mode
the proxy-rewrite headers has bug
https://github.com/apache/incubator-apisix/blob/master/apisix/plugins/proxy-rewrite.lua
this plugin under stand alone , after set apisix.yaml
the check_schema function no use, only execute rewrite
so headers_arr not exist
the bug result is apisix.yaml content:
proxy-rewrite:
headers_arr: ["X-Api-Version", "v1", "X-Api-Engine", "apisix", "X-Api-useless", "6666"]
only this format can used
Environment
apisix version
): 1.2Minimal test code / Steps to reproduce the issue
1.proxy-rewrite:
headers:
2.
3.
What's the actual result? (including assertion message & call stack if applicable)
custom header not useful
What's the expected result?
custom header can useful
The text was updated successfully, but these errors were encountered: