Current Behavior
Every request produces "request.lua:120: set_header(): DEPRECATED" warning in error.log. It makes error.log useless
Expected Behavior
The deprecated set_header call needs to be changed
Error Logs
2023/02/08 06:20:11 [warn] 9883#9883: *152597 [lua] request.lua:120: set_header(): DEPRECATED: use set_header(ctx, header_name, header_value) instead, client: 10.11.69.11, server: _, request: "POST /g/gw/interface/performance/v2.0/data HTTP/1.1", host: "36.133.195.59:18081"
2023/02/08 06:20:11 [warn] 9883#9883: *153292 [lua] request.lua:120: set_header(): DEPRECATED: use set_header(ctx, header_name, header_value) instead, client: 10.11.69.8, server: _, request: "POST /g/gw/interface/performance/v2.0/data HTTP/1.1", host: "36.133.195.59:18081"
2023/02/08 06:20:11 [warn] 9883#9883: *153292 [lua] request.lua:120: set_header(): DEPRECATED: use set_header(ctx, header_name, header_value) instead, client: 10.11.69.8, server: _, request: "POST /g/gw/interface/performance/v2.0/data HTTP/1.1", host: "36.133.195.59:18081"
2023/02/08 06:20:11 [warn] 9884#9884: *153311 [lua] request.lua:120: set_header(): DEPRECATED: use set_header(ctx, header_name, header_value) instead, client: 10.11.69.11, server: _, request: "POST /g/gw/interface/performance/v2.0/data HTTP/1.1", host: "36.133.195.59:18081"
2023/02/08 06:20:11 [warn] 9884#9884: *153311 [lua] request.lua:120: set_header(): DEPRECATED: use set_header(ctx, header_name, header_value) instead, client: 10.11.69.11, server: _, request: "POST /g/gw/interface/performance/v2.0/data HTTP/1.1", host: "36.133.195.59:18081"
Steps to Reproduce
- yum install apisix
- create conf/config.yaml
deployment:
role: traditional
role_traditional:
config_provider: etcd
etcd:
host:
- http://localhost:2379
admin:
admin_key:
- name: admin
key: edd1c9f034335f136f87ad84b625c8f1 # using fixed API token has security risk, please update it when you deploy to production environment
role: admin
apisix:
#ssl:
# ssl_trusted_certificate: /usr/local/apisix/conf/nifi-cert.pem
ssl:
enable: true
listen: # APISIX listening port in https.
- port: 19443
enable_http2: true
node_listen:
- 18092 # APISIX listening port
- 18093
plugin_attr:
prometheus:
export_uri: /apisix/prometheus/metrics
metric_prefix: apisix_
enable_export_server: true
export_addr:
ip: hb3-ifz-bridge-000
port: 9091
log-rotate:
interval: 3600 # rotate interval (unit: second)
max_kept: 168 # max number of log files will be kept
max_size: -1 # max size bytes of log files to be rotated, size check would be skipped with a value less than 0
enable_compression: false # enable log file compression(gzip) or not, default false
- systemctl start apisix
- create route in apisixw-dashboard
{
"uri": "/g/gw/*",
"name": "REST API 测试 18092",
"methods": [
"GET",
"POST",
"PUT",
"DELETE",
"PATCH",
"HEAD",
"OPTIONS",
"CONNECT",
"TRACE",
"PURGE"
],
"vars": [
[
"server_port",
"==",
"18092"
]
],
"plugins": {
"proxy-rewrite": {
"headers": {
"gem_environment": "test",
"rest_gw_proxy_port": "$server_port"
}
}
},
"upstream_id": "439498101292534097",
"status": 1
}
Environment
- APISIX version (run
apisix version): 3.1.0
- Operating system (run
uname -a): 3.10.0-1160.25.1.el7.x86_64
- OpenResty / Nginx version (run
openresty -V or nginx -V):nginx version: openresty/1.21.4.1
- etcd version, if relevant (run
curl http://127.0.0.1:9090/v1/server_info): 3.5.0
- APISIX Dashboard version, if relevant: 3.0.0
- Plugin runner version, for issues related to plugin runners: prometheus, log-rotate
- LuaRocks version, for installation issues (run
luarocks --version):
Current Behavior
Every request produces "request.lua:120: set_header(): DEPRECATED" warning in error.log. It makes error.log useless
Expected Behavior
The deprecated set_header call needs to be changed
Error Logs
2023/02/08 06:20:11 [warn] 9883#9883: *152597 [lua] request.lua:120: set_header(): DEPRECATED: use set_header(ctx, header_name, header_value) instead, client: 10.11.69.11, server: _, request: "POST /g/gw/interface/performance/v2.0/data HTTP/1.1", host: "36.133.195.59:18081"
2023/02/08 06:20:11 [warn] 9883#9883: *153292 [lua] request.lua:120: set_header(): DEPRECATED: use set_header(ctx, header_name, header_value) instead, client: 10.11.69.8, server: _, request: "POST /g/gw/interface/performance/v2.0/data HTTP/1.1", host: "36.133.195.59:18081"
2023/02/08 06:20:11 [warn] 9883#9883: *153292 [lua] request.lua:120: set_header(): DEPRECATED: use set_header(ctx, header_name, header_value) instead, client: 10.11.69.8, server: _, request: "POST /g/gw/interface/performance/v2.0/data HTTP/1.1", host: "36.133.195.59:18081"
2023/02/08 06:20:11 [warn] 9884#9884: *153311 [lua] request.lua:120: set_header(): DEPRECATED: use set_header(ctx, header_name, header_value) instead, client: 10.11.69.11, server: _, request: "POST /g/gw/interface/performance/v2.0/data HTTP/1.1", host: "36.133.195.59:18081"
2023/02/08 06:20:11 [warn] 9884#9884: *153311 [lua] request.lua:120: set_header(): DEPRECATED: use set_header(ctx, header_name, header_value) instead, client: 10.11.69.11, server: _, request: "POST /g/gw/interface/performance/v2.0/data HTTP/1.1", host: "36.133.195.59:18081"
Steps to Reproduce
Environment
apisix version): 3.1.0uname -a): 3.10.0-1160.25.1.el7.x86_64openresty -Vornginx -V):nginx version: openresty/1.21.4.1curl http://127.0.0.1:9090/v1/server_info): 3.5.0luarocks --version):