-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: http_to_https ret_code 307 not working #2257
Comments
启用http跳转https后,设置状态码为307不生效. |
that is a bug. here is the test case. welcome PR to fix it
|
@liuhengloveyou please take a look |
I thinks when we send redirect to 301 ,some browser default change the request to get, so we should add some logical to handle post request , when the request is post we should send the ret_code to 307, according to https://github.com/apache/apisix/blob/master/apisix/plugins/redirect.lua#L136 |
If the user has explicitly configured I think the range of |
@gy09535 |
yeah, should be 308 |
Co-authored-by: YuanSheng Wang <[email protected]>
Issue description
Environment
apisix version
):1.5i use plugin http_to_https and set ret_code 307, like below.
when client sends POST reqeust with http.it's not working, apisix should return 307 and client sends a new request with https again, in fact, apisix return 301 and client sends a new request with https and the method is GET
The text was updated successfully, but these errors were encountered: