Current Behavior
X-Forwarded-Proto header for upstream has been set as a table
Expected Behavior
X-Forwarded-Proto header for upstream should be set as a string
Error Logs
No response
Steps to Reproduce
- create a simple route:
curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
{
"uri": "/test",
"upstream": {
"type": "roundrobin",
"nodes": {
"127.0.0.1:8080": 1
}
}
}'
- visit the route:
curl 127.0.0.1:9080/test -H "X-Forwarded-Proto: http" -H "X-Test: test" -H "X-Forwarded-Proto: http" -H "X-Test: test"
- the upstream will receive:
k: User-Agent, v: [curl/7.64.1]
k: X-Forwarded-For, v: [127.0.0.1]
k: X-Forwarded-Port, v: [9080]
k: X-Forwarded-Proto, v: [table: 0x1b70daa8]
k: X-Forwarded-Host, v: [127.0.0.1]
k: Accept, v: [*/*]
k: X-Test, v: [test test]
k: X-Real-Ip, v: [127.0.0.1]
see:
https://github.com/apache/apisix/blob/master/apisix/init.lua#L230-L233
Environment
- APISIX version (run
apisix version): master branch
- Operating system (run
uname -a): Darwin Kernel Version 19.6.0
- 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
X-Forwarded-Protoheader for upstream has been set as a tableExpected Behavior
X-Forwarded-Protoheader for upstream should be set as a stringError Logs
No response
Steps to Reproduce
see:
https://github.com/apache/apisix/blob/master/apisix/init.lua#L230-L233
Environment
apisix version): master branchuname -a): Darwin Kernel Version 19.6.0openresty -Vornginx -V):curl http://127.0.0.1:9090/v1/server_info):luarocks --version):