nitro
nitro copied to clipboard
Websocket not working in prod build (node-server) with base url
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.
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.
https://github.com/unjs/h3/issues/719 Maybe related and this belongs to h3?
Logs
No response