kasmtech / workspaces-issues

19 stars 4 forks source link

400 Bad Request when exposing Kasm via RunTipi.io using Cloudflare tunnels #509

Open jasonpearce opened 9 months ago

jasonpearce commented 9 months ago

Describe the bug When accessing a new Kasm installation on a RunTipi.io server via a Cloudflare tunnel, the browser response is:

400 Bad Request The plain HTTP request was sent to HTTPS port nginx

To Reproduce Steps to reproduce the behavior:

  1. Build a new Ubuntu 22.04 server on a refubished PC at home behind your firewall
  2. Install RunTipi (https://runtipi.io/docs/getting-started/installation)
  3. Install app Hello World as a test baseline (https://runtipi.io/docs/apps-available)
  4. Expose the Hello World app using Cloudflare tunnels (https://runtipi.io/docs/guides/expose-apps-with-cloudflare-tunnels)
  5. Validate that https://helloworld.example.com works externally via the Cloudflare tunnel (it does)
  6. Install app Kasm Workspaces (https://runtipi.io/docs/apps-available)
  7. Validate that https://:port works locally (it does)
  8. Expose the Kasm app using Cloudflare tunnels (https://runtipi.io/docs/guides/expose-apps-with-cloudflare-tunnels)
  9. Validate that https://kasm.example.com works externally via the Cloudflare tunnel (error 400 bad request)

Expected behavior I'd like to be able to access https://kasm.example.com, running as a RunTipi.io app, via a Cloudflare tunnel remotely/externally.

Screenshots image

Workspaces Version Latest Ubuntu Server, RunTipi.io, and Kasm app

Workspaces Installation Method Physical Lenovo Tiny PC, Ubuntu Server 22.04, Docker, RunTipi.io, Cloudflare Tunnel, Kasm App via the RunTipi app store

Client Browser (please complete the following information):

Workspace Server Information (please provide the output of the following commands):

Additional context I can use Cloudflare tunnels to externally expose other apps installed from the RunTipi.io app store. I've done so for about eight apps. This issue occurs only within the Kasm app. The Kasm app works fine inside my home network via IP address and port. Thank you.

j-travis commented 9 months ago

The error is indicating that the system is trying to access (presumably the kasm server) over HTTP instead of HTTPS , so somewhere in your stack you need to ensure your reverse proxy style system (Cloudflare Tunnel) is proxying to Kasm via HTTPS and not HTTP. I'm not familiar with Tipi so check there as well

jasonpearce commented 9 months ago

Ok. I'll see if I can either figure it out or find a way to report a needed change in the Tipi forums. Thank you.