Hey guys!
I have deployed my Phoenix project to Fly here and set up my DNS records and certs in order to connect to my custom domain here but something is broken.
The fly.dev url works perfectly, but even though my custom domain displays my test text it also throws a “Something went wrong” error..
Fly.io logs say this:
[error] Could not check origin for Phoenix.Socket transport.
[info] Origin of the request: https://wordsmith.pub
[info] This happens when you are attempting a socket connection to
[info] a different host than the one configured in your config/
[info] files. For example, in development the host is configured
[info] to “localhost” but you may be trying to access it from
[info] “127.0.0.1”. To fix this issue, you may either:
[info] 1. update [url: [host: …]] to your actual host in the
[info] config file for your current environment (recommended)
[info] 2. pass the :check_origin option when configuring your
[info] endpoint or when configuring the transport in your
[info] UserSocket module, explicitly outlining which origins
[info] are allowed:
[info] check_origin: [“https://example.com”,
[info] “//another.com:888”, “//other.com”]
I tried to do step 1 by changing the config.exs file in my Phoenix project to add url: [host: "wordsmith.pub"],
but that didn’t fix anything and I don’t know how to do the second suggestion.
I didn’t see any documentation on Fly indicating I would have to change my Phoenix files in order to deploy to a custom domain, so I’m not sure what to try next.
My first thought is that this is some kind of DNS record propagation issue. I added the certs and DNS records pointing to the custom domain yesterday morning. So let me know if I simply need to wait longer!
Thanks!