mirror of
https://github.com/livebook-dev/livebook.git
synced 2024-11-15 12:25:31 +08:00
64dad900d7
Closes #2216.
16 lines
323 B
Elixir
16 lines
323 B
Elixir
defmodule LivebookWeb.ConfiguredPlug do
|
|
# Runs plugs configured for the :livebook application
|
|
|
|
@behaviour Plug
|
|
|
|
@impl true
|
|
def init(opts), do: opts
|
|
|
|
@impl true
|
|
def call(conn, _opts) do
|
|
case Application.fetch_env!(:livebook, :plugs) do
|
|
[] -> conn
|
|
plugs -> Plug.run(conn, plugs)
|
|
end
|
|
end
|
|
end
|