How do I deploy a LiveView app such that I want the WebSocket to be hosted on a separate domain than the deployed app? I want my app liveview.com app to access the websockets on
I have changed my
app.js to point to the full website, but the LiveView crashes and infinitely refreshes. I have changed the
check_origin: policy to false and set
session_options as, but still it does not connect. I can see on the network inspector that the cookie is not set when accessing
wss://notliveview.com from a website hosted on
@session_options [ store: :cookie, key: "_app_web_key", signing_salt: "ARodNYY", same_site: "None", secure: true ]
I have deployed my Phoenix LiveView app on Fly and the new marketing site (generated using a static site generator on Vercel). I’m planning to use Vercel as the front-facing website. When a person visits your site, it first checks if it matches the Vercel ones and if it doesn’t the rest of the request is reverse proxied through next.config.js: Rewrites | Next.js through to the LiveView app.
It works fine for apps over HTTP, but does not work with Websockets because of the above issue, any pointers would be really helpful.