Current Behavior
currently, apisix gets the "X-Forwarded-Proto" header when calling the set_upstream_headers function,
https://github.com/apache/apisix/blob/master/apisix/init.lua#L228-L239
but it reads all the headers first, which may cause the CPU to rise abnormally if the number of headers is very large and the size is large
https://github.com/apache/apisix/blob/master/apisix/core/request.lua#L45-L66

Expected Behavior
No response
Error Logs
No response
Steps to Reproduce
none
Environment
- APISIX version (run
apisix version):
- 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
currently, apisix gets the "X-Forwarded-Proto" header when calling the set_upstream_headers function,
https://github.com/apache/apisix/blob/master/apisix/init.lua#L228-L239
but it reads all the headers first, which may cause the CPU to rise abnormally if the number of headers is very large and the size is large
https://github.com/apache/apisix/blob/master/apisix/core/request.lua#L45-L66
Expected Behavior
No response
Error Logs
No response
Steps to Reproduce
none
Environment
apisix version):uname -a):openresty -Vornginx -V):curl http://127.0.0.1:9090/v1/server_info):luarocks --version):