How to set url prefix for wss: requests on Phoenix Liveview ?

I try to get the DemoWeb Liveview application running.
I have to go through a proxy and therefor need a url prefix, e.g.
I have set url: [host: “”, path: “foo”, port: 443] in dev.exs
The http request have the ‘foo’ path and therefor are working (I can see the thermostat web page).
However the wss: requests fail since the browser tries to connect to wss://,
i.e the path ‘foo’ is missing.
How can I set the path for wss requests ?

In myapp/lib/myapp_web/ there is an endpoint.ex file which contains the definition of the socket. you will see in there something like this:

  socket "/live", Phoenix.LiveView.Socket

That is where the path for the socket is set …

You will also need to change the path in assets/js/app.js to point to the right place as well, e.g.:

let liveSocket = new LiveSocket("/foo/live")