Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Websocket not working in prod build (node-server) with base url #2347

Open
edivados opened this issue Apr 8, 2024 · 0 comments
Open

Websocket not working in prod build (node-server) with base url #2347

edivados opened this issue Apr 8, 2024 · 0 comments

Comments

@edivados
Copy link

edivados commented Apr 8, 2024

Environment

Preset: node-server
Nitro: 2.9.6
Node: v18.18.0 (Stackblitz) / v20.5.1

Reproduction

The chat example from crossws.
No websocket logs are printed and the ping button doesn't work either. Removing the baseURL or switching to dev works.

Open in StackBlitz

Note: The error handler does a redirect because I don't know how to tell Stackblitz to open a specific path (if that is even possible)...

Describe the bug

Websocket in production build (node-server) with a baseURL other than / does not work.

Additional context

Looks like the asset handler that is in front gets picked.

unjs/h3#719 Maybe related and this belongs to h3?

Logs

No response

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

No branches or pull requests

1 participant