You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
not possible to replicate service structure in stackblitz
Description
When running Nuxt development behind a reverse proxy like traefik, the client websocket's client URL does not necessarily match the websocket server URL. For instance, the reverse proxy can terminate SSL while Nuxt runs plain http, making the current websocket implementation offer ws: as protocol while it should be wss:.
The server can't know under which address it's offered to the client, so the client side needs to device whether to try wss or ws first, depending on the mode Nuxt is served to it. The same goes for the hostname.
Actually, vite's hmr server connection is constructed in a similar fashion, that's why it works right away in all contexts:
Actually, if anyone wants to test as setup with a reverse proxy, content.watch.hostname needs to be set to 0.0.0.0, but that's up to the user project to define, not in this module's source.
Logs
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Environment
irrelevant
Version
v3.5.1
Reproduction
not possible to replicate service structure in stackblitz
Description
When running Nuxt development behind a reverse proxy like traefik, the client websocket's client URL does not necessarily match the websocket server URL. For instance, the reverse proxy can terminate SSL while Nuxt runs plain http, making the current websocket implementation offer
ws:
as protocol while it should bewss:
.The server can't know under which address it's offered to the client, so the client side needs to device whether to try
wss
orws
first, depending on the mode Nuxt is served to it. The same goes for the hostname.Actually, vite's hmr server connection is constructed in a similar fashion, that's why it works right away in all contexts:
Additional context
I'll submit a PR right away: #3344
Actually, if anyone wants to test as setup with a reverse proxy,
content.watch.hostname
needs to be set to0.0.0.0
, but that's up to the user project to define, not in this module's source.Logs
The text was updated successfully, but these errors were encountered: