PySpark's Connect client normally talks to the server over native gRPC, that requires using HTTP/2. Only HTTP/1.1 is available in a browser/WASM runtime, so this demo swaps the transport to rewrite the transport over HTTP/1.1 (also known as gRPC-web).
On the backend, a Traefik reverse proxy is bumping back the connection to HTTP/2 (as well as handling HTTPs and some Basic Auth for this demo) and forwarding directly to a Spark cluster.