Skip to content

The WebSocket connection fails with host 0.0.0.0 #3235

@paulmelero

Description

@paulmelero

Is your feature request related to a problem? Please describe

In Development, the web socket connection expects to work with localhost but it fails with 0.0.0.0.

http://0.0.0.0:3000/ http://localhost:3000/
Image Image

Describe the solution you'd like

Maybe the module could work easily with other hosts. TBH, I didn't try custom local domains with Nuxt content. I tried to map 0.0.0.0 to localhost in my /etc/hosts file, but it also fails. I guess, it just tries to connect with localhost and it cannot be changed...

Describe alternatives you've considered

  • Maybe if the connection errors, we could show a more helpful error message in the browser console too.
  • The module could expose the host as an option to configure, and it should be documented

Additional context

It seems like wsUrl is an option in the module, but I couldn’t find it in the docs or if it's configurable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions