leslie-tsang edited a comment on issue #6078:
URL: https://github.com/apache/apisix/issues/6078#issuecomment-1011779523


   > Maybe I encountered the same problem. The reason I found is that our 
APISIX behind a proxy that responsed for decrypted the TLS and proxied always 
HTTP scheme to APISIX. let's see the redirect plugin code:
   > 
   > ```lua
   > if conf.http_to_https and ctx.var.scheme == "http" then
   > -- ignore
   > end
   > ```
   > 
   > It will makes the redirect loop apparently.
   > 
   > the resolution is patching this plugin just like:
   > 
   > ```lua
   > local proxy_proto = core.request.header(ctx, "x-forwarded-proto")
   > local _scheme = proxy_proto and proxy_proto or ctx.var.scheme
   > if conf.http_to_https and _scheme == "http" then
   > -- ignore
   > end
   > ```
   
   Hello there, @ke4qqq Would you like to submit a PR to fix it ? Thanks.


-- 
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