Having problems connecting to my wss in Phoenix

Connecting to my render.com app subdomain works fine:

https://hogaria.onrender.com

But when I connect to my own domain, I see that the websocket connection is failing.

https://hogaria.app/


Here’s what my prod.exs configuration file looks like:

config :hogaria, HogariaWeb.Endpoint,
  server: true,
  url: [host: System.get_env("RENDER_EXTERNAL_HOSTNAME") || "localhost", port: 80],
  cache_static_manifest: "priv/static/cache_manifest.json"

Any suggestions welcome! ps. Love your service, looking forward to many years together!

Replace RENDER_EXTERNAL_HOSTNAME with your custom domain in the the url above.

From Deploy a Distributed Elixir Cluster | Render Docs

If you add a custom domain to your Render app, don’t forget to change the host to your new domain.

2 Likes