Skip to content

Conversation

CertainLach
Copy link
Contributor

@CertainLach CertainLach commented Sep 16, 2025

Comment on lines +20 to +24
if (
headers.get("upgrade") !== "websocket" ||
// Vite uses websockets with protocol set to vite-hmr, vite-ping
headers.get("sec-websocket-protocol")?.startsWith("vite-")
) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wish every non-vite request was going through this route, as the current implementation looks too fragile

It is however only required and used for websocket for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fresh V2 Beta WebSocket upgrade request never reaches server behind vite development environment

1 participant