Can I just point my DNS to my server, and then most things work?
Websockets/LiveView seems to not be working out of the box. I end up in an infinite reconnect loop.
My logs helpfully tells me that:
Origin of the request: https://mydomain.com
This happens when you are attempting a socket connection to
a different host than the one configured in your config/
files. For example, in development the host is configured
to "localhost" but you may be trying to access it from
"127.0.0.1". To fix this issue, you may either:
1. update [url: [host: ...]] to your actual host in the
config file for your current environment (recommended)
2. pass the :check_origin option when configuring your
endpoint or when configuring the transport in your
UserSocket module, explicitly outlining which origins
The first option won’t work since I have multiple domains. The second is viable.
For :force_ssl it’s documented. For :url it should work automatically for any domain if you use a conn as the first param for the url generating helpers. What you set as setting on the endpoint is just the default to fall back for other inputs to those helpers, which don’t have access to a current request.