GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Putting Caddy in front of t3 code with https fails due to the web socket not being encrypted · Issue #328 · pingdotgg/t3code Closed DescriptionNOTE: Most of this report is generated by gpt-5.4, but I reviewed it manually and it does refer to a genuine bug I experienced. Also see below why I did not submit a PR. ProblemT3 Code This is a product bug in T3's browser client bootstrap logic. The app was assuming a non-TLS websocket origin even when the page itself was loaded from an HTTPS origin behind a reverse proxy. SymptomThe browser console shows a startup failure similar to: In practical terms, the page shell can load, but real-time state hydration and interactive behavior do not come up correctly because the main websocket transport never connects. Reproduce ConditionsThis bug is most likely to appear under all of the following conditions:
This is especially easy to trigger in the common production topology:
In that topology, Why This Is BrokenThe browser's security model requires websocket security to match the page security context:
If the frontend derives its websocket URL from a static default, a plain-host assumption, or duplicated URL-building logic that forgets to switch protocols under HTTPS, the app fails only in secured deployments. That makes the defect easy to miss in local development and easy to hit in real deployment. Internal Fix We WroteWe patched T3's frontend websocket URL derivation so the default websocket origin is computed from the active browser location:
We also characterized and fixed a second consistency problem at the same time: HTTP-origin derivation for related frontend features was spread across multiple call sites. The internal patch centralized that origin-resolution logic so websocket and HTTP URL derivation use the same source of truth. Affected source files in the internal fix:
Me the user, here (manual edit to this report): However, since T3 Code is not accepting merge requests from external at this time, I am simply reporting that I managed to fix this in my own local copy of the app, and will not be contributing my exact fix unless it is asked of me by someone on the T3 team. Expected Behavior After FixWhen the app is opened through HTTPS:
When the app is opened through plain HTTP in development:
Scope of the IssueThis is not a deployment-only mistake. The deployment topology exposed it, but the actual defect was in T3's frontend runtime behavior:
Any T3 deployment that serves the app through HTTPS without explicitly overriding the websocket URL could encounter the same failure. Reacted by JtMotoX Reacted by Hwanseo Choi and Thomas Henn Activity
MetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |