Repository navigation
Conversation
chan-mai
requested review from
chargome and
s1gr1d
and removed request for
a team
November 4, 2026 07:16
3 tasks done
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why:
The tunnel plugin for Nitro 2 added in #25418 inserts a layer with an empty route
''at the top of the h3 application stack. The h3 WebSocket handler resolution logic skips layers with a route of'/', but it does not skip layers with''. As a result, this layer matched all paths, preventing the app-defined WebSocket handler'supgradehook from being called.Changing the route to
'/'causes this layer to be skipped during WebSocket handler resolution. For HTTP request processing, layers with a route of'/'continue to match all paths as well, so the tunnel behavior remains unchanged. In #25991, the maintainer approved this change as a temporary fix until #26001 is merged.How to review:
The change in
tunnel-legacy.server.tsis just a single line for the route value. The added test uses h3'screateAppandcreateRouterto apply the plugin to an app where the router is mounted at/, just like Nitro. It then verifies the following three points:upgradehook.I have confirmed that the first test fails with the code before the fix.
Unsure about:
I have not added an E2E test using WebSockets in an actual Nuxt app. All I ran for verification were the unit tests for the nuxt package and the linting for the modified files.
Closes #25991