You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The security guide says to keep auth: false on loopback, but doesn't say how to put a check of your own in front of the socket. We're building Angular DevTools on devframe, and we wrapped the upgrade listeners after setup and missed the one devframe adds later through the server option, so LAN clients could reach the hub socket on Vite with host: true. Switching to handleUpgrade from our own listener fixed it.
This adds a short practice to the security guide and one sentence to the WebSocket binding section of the initiate adapter page, so other integrators don't hit the same thing.
Reject and destroy sockets when upgrade access checks fail
docs/content/1.guide/14.security.md:78
When this access check fails, returning without calling handleUpgrade does not reject the HTTP upgrade. Node leaves the raw socket open, so rejected clients can consume connections indefinitely. Tell the listener owner to send a rejection and destroy the socket on the failure path.
Shorten documentation sentence and remove contraction
docs/content/2.adapters/1.initiate.md:124
The added sentence is 29 words and uses a contraction. This violates the repository's required plain-English documentation rules, which limit descriptive sentences to 25 words and prohibit contractions. Split the binding warning into short statements.
Filter upgrade events before rejecting non-devframe WebSockets
docs/content/1.guide/14.security.md:78
An owned upgrade listener receives every WebSocket upgrade on the shared server, not only the devframe route. As written, a failed check sends 403 and destroys unrelated sockets such as Vite HMR before handleUpgrade gets a chance to apply its internal path filter. Require checking the pathname against ${devtools.base}__ws first and leaving non-matching sockets untouched.
Avoid interfering with host framework WebSocket upgrades
docs/content/2.adapters/1.initiate.md:124
This also needs to state that the host listener sees upgrades for every route. Without filtering for <base>__ws before the custom check, an integrator may reject or otherwise interfere with the host framework's own WebSocket upgrades; handleUpgrade only performs its route filter after the check passes.
Good point from the last review: a custom listener sees every upgrade on the server. Both pages now say to act only on <base>__ws and leave the host framework's own upgrades (like Vite HMR) alone.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The security guide says to keep
auth: falseon loopback, but doesn't say how to put a check of your own in front of the socket. We're building Angular DevTools on devframe, and we wrapped theupgradelisteners after setup and missed the one devframe adds later through theserveroption, so LAN clients could reach the hub socket on Vite withhost: true. Switching tohandleUpgradefrom our own listener fixed it.This adds a short practice to the security guide and one sentence to the WebSocket binding section of the initiate adapter page, so other integrators don't hit the same thing.