kwanhur commented on code in PR #6686:
URL: https://github.com/apache/apisix/pull/6686#discussion_r867950034


##########
apisix/plugins/redirect.lua:
##########
@@ -147,6 +148,7 @@ function _M.rewrite(conf, ctx)
     core.log.info("plugin rewrite phase, conf: ", core.json.delay_encode(conf))
 
     local ret_code = conf.ret_code
+    local ret_port = tonumber(ctx.var["var_x_forwarded_port"])

Review Comment:
   Oh, seems I got what you mean. The server port `80` and then enable 
`http_to_https`, it'll always redirect to `https://host:80` then get `400 bad 
request`. cc @tokers @spacewander @tzssangglass 
   
   We need to take more consideration about 
https://github.com/apache/apisix/pull/6686#issuecomment-1113004299



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to