Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Websockets in umbrella #81

Open
chevinbrown opened this issue Jun 18, 2019 · 0 comments
Open

Websockets in umbrella #81

chevinbrown opened this issue Jun 18, 2019 · 0 comments

Comments

@chevinbrown
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant