Packages

Proxies requests to multiple apps. Useful for Gigalixir or Heroku deployment when just one web port is exposed. Works with phoenix endpoints, plugs, and websockets.

Current section

Files

Jump to
main_proxy lib main_proxy plug not_found.ex
Raw

lib/main_proxy/plug/not_found.ex

defmodule MainProxy.Plug.NotFound do
@moduledoc false
@behaviour Plug
import Plug.Conn
require Logger
@impl true
def init(options) do
options
end
@impl true
def call(conn, opts) do
Logger.debug("MainProxy.NotFound call opts: #{inspect(opts)}")
conn
|> send_resp(404, "No backends matched")
end
end