rancher / rio

Application Deployment Engine for Kubernetes
https://rio.io
Apache License 2.0
2.27k stars 228 forks source link

How to redirect to https on same domain #992

Closed kozy closed 4 years ago

kozy commented 4 years ago

Hi guys, thanks for this highly useful tool

I am trying to do a protocol change. Simply redirect all http requests to the https variant, i.e. http://example.com -> https://example.com

Can someone provide me with an example of this? Can't figure it out. I am able to redirect to different domains but unable to differentiate, nor in the router, nor on the protocol.

I can do something like

  routes:
  - match: {}
    redirect:
      toHTTPS: true

But that results in a redirect loop.

Thanks!

cbron commented 4 years ago

Hi @kozy, can you try this: https://github.com/rancher/rio/issues/467 Where you setup the domain and then the router. If you still get redirect loop with that can you post your domain/router/service specs, thanks.

kozy commented 4 years ago

Finally got to it, I found a better understanding of gloo was needed. The fact that https was deducted from ssl settings got me confused. But now got it working, thanks!

boredland commented 4 years ago

hi @kozy I seem to be as stuck as you were, perhaps now, that you solved it, could you "provide me with an example of this?" ;-)

Mobilpadde commented 4 years ago

I too, as @boredland, cannot seem to get HTTPS redirection to work? Any pointers would be great, ping @kozy :wink: