I deployed phoenix liveview app after that I add a domain name certificate. When I opened the application on the new domain, the website keeps on refreshing. What is the reason for this problem?
lubien
March 8, 2022, 6:51pm
2
This is likely an Phoenix configuration issue.
Take a look at this old case:
To expand on this, Phoenix enforces same origin for websockets by default, (check_origin: true endpoint config). By default, we will enforce the same origin as configured in your :url, but you can also provide a list of hosts if you have other needs. For example:
config :my_app, MyAppWeb.Endpoint,
check_origin: ["//example.com", "//another.com"]
For applications generated with phx.new >= 1.6.3, the config/runtime.exs will use a PHX_HOST environment export if available to set the endpoint url…