nitro icon indicating copy to clipboard operation
nitro copied to clipboard

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

Open edivados opened this issue 2 months ago • 0 comments

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.

https://github.com/unjs/h3/issues/719 Maybe related and this belongs to h3?

Logs

No response

edivados avatar Apr 08 '24 18:04 edivados