Current Behavior
Recently, I upgraded apisix with the latest code, and found that there was an error in converting http to https. When redirecting, I always bring a port 80. It should be caused by this change:https://github.com/apache/apisix/pull/6686/files#r867816800
Maybe set $var_x_forwarded_port $server_port; in ngx_tpl.lua conflicts with local ret_port = tonumber(ctx.var["var_x_forwarded_port"]) in redirect.lua
Expected Behavior
port changed from 80 to 443
Error Logs
No response
Steps to Reproduce
add redirect and set http_to_https to true
Environment
- APISIX version (run
apisix version): master
- 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
Recently, I upgraded apisix with the latest code, and found that there was an error in converting http to https. When redirecting, I always bring a port 80. It should be caused by this change:https://github.com/apache/apisix/pull/6686/files#r867816800
Maybe
set $var_x_forwarded_port $server_port;in ngx_tpl.lua conflicts withlocal ret_port = tonumber(ctx.var["var_x_forwarded_port"])in redirect.luaExpected Behavior
port changed from 80 to 443
Error Logs
No response
Steps to Reproduce
add redirect and set http_to_https to true
Environment
apisix version): masteruname -a):openresty -Vornginx -V):curl http://127.0.0.1:9090/v1/server_info):luarocks --version):