I came across the following thread while working to accomplish something similar:
I’m hoping to deploy an application that will serve up different endpoints for different hosts; eg, a request to foo.com will be routed to FooWeb.Endpoint, and a request to bar.com to BarWeb.Endpoint.
The routing part is easy. It does, though, break LiveView somehow—I get a 404 on the socket. Chris mentions something about “need[ing] to specify the socket declarations” on the child proxy application, but I’m not sure exactly what that means. I’m wondering if he, or someone else, could expound upon that!
That does! I think I was turned around on it because my initial proxy endpoint was only utilizing plug_cowboy, so I just wasn’t thinking about the socket/3 macro.