Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

Fix custom domain showing up for the wrong reason (#3324)

hq15ff85268447c
diff --git a/lib/plausible_web/controllers/site_controller.ex b/lib/plausible_web/controllers/site_controller.ex
index 329a6ca739..f9aaa993fa 100644
--- a/lib/plausible_web/controllers/site_controller.ex
+++ b/lib/plausible_web/controllers/site_controller.ex
@@ -245,10 +245,12 @@ defmodule PlausibleWeb.SiteController do
end
def settings_props(conn, _params) do
+ site = conn.assigns[:site] |> Repo.preload(:custom_domain)
+
conn
|> assign(:skip_plausible_tracking, true)
|> render("settings_props.html",
- site: conn.assigns.site,
+ site: site,
layout: {PlausibleWeb.LayoutView, "site_settings.html"},
connect_live_socket: true
)