workspaces-issues icon indicating copy to clipboard operation
workspaces-issues copied to clipboard

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

Open jasonpearce opened this issue 1 year ago • 2 comments

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

  • OS: Windows 11
  • Browser Firefox 122

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

  • uname -a
  • cat /etc/os-release
  • sudo docker info
  • sudo docker ps | grep kasm

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.

jasonpearce avatar Feb 02 '24 17:02 jasonpearce

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

j-travis avatar Feb 03 '24 04:02 j-travis

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.

jasonpearce avatar Feb 03 '24 21:02 jasonpearce