HTTPS Environment Detected: Because this page is hosted on https://, the browser blocks unencrypted ws:// connections.
To connect to your local Go bridge from this remote page, use a secure wss:// endpoint.
When this web page is loaded from a remote server (e.g., https://your-pos-site.com), browsers will block unencrypted ws:// connections. You must connect over wss://.
Recommended Production Solution (Let's Encrypt + DNS):
Add an A record in DNS: local.yourdomain.com → 127.0.0.1
Get a free Let's Encrypt SSL certificate for that domain.
Run the Go bridge with: ./lti-bridge -cert cert.pem -key key.pem
Connect using: wss://local.yourdomain.com:8080/ws
2. Quick Testing with Cloudflare Tunnel (Zero-Config HTTPS)
To test from remote HTTPS without buying domains or generating certs, run a free tunnel on the cashier PC:
cloudflared tunnel --url http://127.0.0.1:8080
Copy the resulting https://*.trycloudflare.com address and paste it into the bridge input box above as wss://*.trycloudflare.com/ws.
If your address bar shows https://, Chrome, Edge, Safari, and Firefox strictly block connections to unencrypted ws://localhost.
Solution: The HTML file must be opened locally via http://localhost:8080 or file:///....
2. Quick Presets
Select a preset endpoint depending on whether you are running locally or through your remote domain:
3. Recommended: Have the Go bridge serve this HTML directly
To completely eliminate browser security restrictions, add this one line to your Go binary so it serves this HTML page on http://localhost:8080:
// In main.go main() function:
http.Handle("/", http.FileServer(http.Dir(".")))
http.HandleFunc("/ws", handleWebSocket)
Then save this HTML file as index.html next to your Go binary and open http://localhost:8080 in your browser!