Websockets in umbrella
Opened this issue · 0 comments
chevinbrown commented
I have verk_web configured as a separate app in our umbrella project (not mounted in any phoenix apps).
We have one proxy app that kindof plugs requests to the other phoenix endpoints.
Shortened:
defmodule ProxyWeb.Endpoint do
@domains %{
"admin.app1.com" => AdminWeb.Endpoint,
"verk.app1.com" => VerkWeb.Endpoint
}
def init(opts), do: opts
def call(conn, _) do
with domain <- get_domain(conn),
endpoint <- Map.get(@domains, domain, @default_host) do
endpoint.call(conn, endpoint.init(:supervisor, endpoint))
end
end
end
VerkWeb is totally fine here, except for websockets:
[info] Converted error Phoenix.Router.NoRouteError to 404 response
[info] GET /socket/websocket
I'm not quite sure what I should do from here, but happy to provide more detail or even PR if we find it's a real issue.