From 3f33ab87df41261160e63868aafd690816077019 Mon Sep 17 00:00:00 2001 From: Leandro Pereira Date: Thu, 12 Dec 2024 09:12:40 -0500 Subject: [PATCH] debug --- lib/beacon/proxy_endpoint.ex | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/beacon/proxy_endpoint.ex b/lib/beacon/proxy_endpoint.ex index a83c9336..933b5d41 100644 --- a/lib/beacon/proxy_endpoint.ex +++ b/lib/beacon/proxy_endpoint.ex @@ -30,8 +30,13 @@ defmodule Beacon.ProxyEndpoint do plug :proxy def proxy(conn, opts) do + require Logger + %{host: host} = conn + Logger.debug("@session_options => #{inspect(@session_options)}") + Logger.debug("conn.host => #{host}") + endpoint = Enum.reduce_while(Beacon.Registry.running_sites(), @__beacon_proxy_fallback__, fn site, default -> %{endpoint: endpoint} = Beacon.Config.fetch!(site) @@ -43,6 +48,8 @@ defmodule Beacon.ProxyEndpoint do end end) + Logger.debug("endpoint => #{inspect(endpoint)}") + endpoint.call(conn, endpoint.init(opts)) end end