diff --git a/lib/livebook/application.ex b/lib/livebook/application.ex index 4503d9940..ff361a750 100644 --- a/lib/livebook/application.ex +++ b/lib/livebook/application.ex @@ -197,12 +197,14 @@ defmodule Livebook.Application do port = Livebook.Config.iframe_port() if server? do - iframe_opts = [ - scheme: :http, - plug: LivebookWeb.IframeEndpoint, - options: [port: port], - ip: Application.fetch_env!(:livebook, LivebookWeb.Endpoint)[:http][:ip] - ] + http = Application.fetch_env!(:livebook, LivebookWeb.Endpoint)[:http] + + iframe_opts = + [ + scheme: :http, + plug: LivebookWeb.IframeEndpoint, + port: port + ] ++ Keyword.take(http, [:ip]) spec = Plug.Cowboy.child_spec(iframe_opts) spec = update_in(spec.start, &{__MODULE__, :start_iframe, [port, &1]})