The interface loads, but status information stops updating or the application repeatedly reconnects. The browser reports WebSocket code 1006; the origin may log HTTP 400 with a missing Upgrade header. A Home Assistant report describes this combination behind Cloudflare Tunnel. Its reported transport comparison is a case-specific lead, not a universal repair. Q1
1006 does not identify the cause
Start with connection establishment. A sign-in redirect, access denial, malformed upgrade and later disconnect are different situations. Cloudflare applies the relevant HTTP request controls to the initial WebSocket handshake. Q2 Establish what happened at that stage before changing connection-lifetime settings.
Separate establishment from ongoing operation
- Find the affected request. In browser network tools, identify the WebSocket path. Record status, time and how long the connection remained open. Do not copy full URLs containing session tokens into a support enquiry.
- Classify the first response. A redirect to sign-in points initially towards authentication handling. A 403 calls for correlation with access rules. HTTP 400 specifically naming a missing upgrade leads instead towards request headers and proxy forwarding.
- Compare the origin evidence. Determine which request arrived at the origin at the same time. Compare it with an authorised direct test using an appropriate hostname. A working home page does not replace a test of this particular WebSocket endpoint.
- List intermediate components. Include additional reverse proxies, access layers and relevant header rules. Look for the first point where the expected request changes or receives a different response. Avoid changing several layers simultaneously.
- Test the transport hypothesis narrowly. If the observations match the original report, a controlled connector-transport comparison may be useful.
--protocol http2controls the Cloudflare-facing connection; it does not automatically enable HTTP/2 to the origin. Q3 Review effects on other routes and required UDP services.
Verify a useful connection
After a correction, confirm more than a successful first handshake. Observe a harmless live update and check that the connection remains usable. A subsequent idle disconnect is a separate finding and should not automatically be treated as evidence that the original header problem remains.
For handoff, prepare the browser response, sanitised endpoint path, origin error, tunnel version and proxy chain. State clearly whether failure occurs before or after establishment. Preserve intended access controls during the comparison so that a seemingly successful test does not merely bypass the application's real sign-in path.
Frequently asked questions
Does 1006 prove a Cloudflare fault?
No. The establishment response and correlated logs are needed to locate the failing stage.
Should I add an Upgrade header to every request?
That is not a useful general repair. Establish whether and where an actual WebSocket request is being mishandled first.
Prepare a findings note
Summarise your observations for your enquiry. The note is created in your browser and is not saved or sent here. You can then copy it into the contact form.
Unknown is fine. Do not enter passwords, customer data or complete confidential logs.
Support with this issue
We can trace the handshake through access controls, the tunnel and the origin.
