Current Behavior
- send a request with header
xtag: b
curl http://127.0.0.1:9080/get -H "xtag: b"
- accessing and updating header
xtag in apisix.
After the update, when accessing the HTTP header xtag through ctx.var, it was expected to receive a but received b
-- get: b
core.log.info("ctx.var.http_xtag: ", ctx.var.http_xtag)
-- set header, xtag = a
core.request.set_header(ctx, "xtag", "a")
-- get: b
-- expect: a
core.log.info("ctx.var.http_xtag: ", ctx.var.http_xtag)
As shown in the above example, when using ctx.var to retrieve the HTTP header, once the value is cached, it will no longer be updated.
Expected Behavior
When updating the HTTP header, the ctx.var cache will also be updated.
Environment
- APISIX version (run
apisix version): 3.9.0
- Operating system (run
uname -a):
- OpenResty / Nginx version (run
openresty -V or nginx -V):
- etcd version, if relevant (run
curl http://127.0.0.1:9090/v1/server_info):
- APISIX Dashboard version, if relevant:
- Plugin runner version, for issues related to plugin runners:
- LuaRocks version, for installation issues (run
luarocks --version):
Current Behavior
xtag: bcurl http://127.0.0.1:9080/get -H "xtag: b"xtagin apisix.After the update, when accessing the HTTP header
xtagthrough ctx.var, it was expected to receiveabut receivedbAs shown in the above example, when using ctx.var to retrieve the HTTP header, once the value is cached, it will no longer be updated.
Expected Behavior
When updating the HTTP header, the ctx.var cache will also be updated.
Environment
apisix version): 3.9.0uname -a):openresty -Vornginx -V):curl http://127.0.0.1:9090/v1/server_info):luarocks --version):