gy09535 commented on a change in pull request #2311:
URL: https://github.com/apache/apisix/pull/2311#discussion_r495037342
##########
File path: apisix/plugins/redirect.lua
##########
@@ -133,7 +135,11 @@ function _M.rewrite(conf, ctx)
-- TODOļ¼ add test case
-- PR: https://github.com/apache/apisix/pull/1958
uri = "https://$host$request_uri"
- ret_code = 301
+ if ngx.req.get_method() == http_post then
+ ret_code = 308
+ else
+ ret_code = 301
+ end
Review comment:
The http to https is a feature and the ret_code is other feature, when
apisix receive http request should change it to https, when apisix receive
https we should redirect it to user ret_code, they are not conflict.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]