rancher / rio

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

Dashboard in infinite redirect loop with custom domain #1002

Closed tombh closed 4 years ago

tombh commented 4 years ago

When visiting https://dashboard-rio-system.rio.customdomain.com there's an infinite redirect loop.

To Reproduce Rio install without Lets Encrypt and RDNS. Set up a custom domain with:

apiVersion: admin.rio.cattle.io/v1
kind: ClusterDomain
metadata:
  name: example.com
spec:
  httpPort: 80

I'm using my own Nginx ingress and cert-manager installs on the same cluster in order to manage my own wildcard domain certs. The ingress's backend is gateway-proxy, all other apps setup in my Riofile work fine.

Kubernetes 1.16 on Digital Ocean. Rio v0.7.0

Maybe Rio's trying to redirect to HTTPS because Nginx is only forwarding it the 80 port?

StrongMonkey commented 4 years ago

@tombh Dashboard will force you to use HTTPS since it requires login

tombh commented 4 years ago

Thanks @StrongMonkey

The issue was actually caused by Cloudflare's "Flexible" SSL forwarding, even though I'd request the HTTPS version, Cloudflare would then forward to the HTTP version, thus causing the infinite redirect loop.