Connecting machines with websockets from the same app fails

I’m trying to connect my machines between them.

It works successfully with http connections. For http, my URL looks like this:

http://<machine_id>.vm.<app_name>.internal:<port>

It works great (although I’m not sure if I should use .flycast or .internal).

But when I try to setup a websocket connections between my two machines, it fails. I’m using the same URL with the ws protocol instead:

ws://<machine_id>.vm.<app_name>.internal:<port>

Here is the relevant part of the config from the app that should accept websocket connections:

[http_service]
  internal_port = 3000
  force_https = false
  auto_stop_machines = "off"
  auto_start_machines = false
  processes = ['app']

EDIT

I just mixed my config files, the issue was that force_https was set to true.

1 Like

makes sense, you were using ws://. I wonder if it would work if you used wss:// instead (w/ the original config.)

I wonder as well, but I’m anything but sure about that. I remember having read somewhere that you can’t use secure protocols (https or wss) when internally communicating between machines.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.