-
-
Notifications
You must be signed in to change notification settings - Fork 155
Description
I am hosting devpush behind a Cloudflare Zero Trust Tunnel (https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/) so Cloudflare manages TLS and user 'login' before allowing traffic to the devpush app. I have this working, but I had to setup the tunnel to direct traffic to https://localhost:443 with TLS Verify Disabled in Cloudflare because naturally the localhost is the wrong host for the certificate being served from devpush and Cloudflare otherwise blocks the connection.
There is no need to use TLS with the tunnel as Cloudflare is managing the TLS with the client and the normal approach is to tunnel the traffic to http://localhost:80 (not TLS) - I have cloudflared running on the server to manage the tunnel for this purpose.
So this request is for a configurable way to either disable TLS or disable the forced redirect from HTTP to HTTPS. Without this, Cloudflare tunnels to HTTP, devpush then triggers a 308 Permanent Redirect back to HTTPS (i.e. back to Cloudflare) and this loop repeats until the user's browser gives up with too many redirects error.
I note #20 (comment) shows how to do this manually by editing https://github.com/hunvreus/devpush/blob/main/compose/ssl-default.yml file - can there be a clean way to set this configuration (ideally Environment variables?) - I am using Terraform to bring up a Hetzner server and deploy devpush and cloudflared fully automated so trying to avoid manually editing config files after bootstrapping if possible.