From adb5e380daefa3bb95104b5005170427f4dacf76 Mon Sep 17 00:00:00 2001 From: Christian Blavier Date: Thu, 26 Oct 2023 10:39:42 +0200 Subject: [PATCH] Strip suffix slashes to prevent double-slash issues (#430) --- lib/phoenix/live_dashboard/router.ex | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/phoenix/live_dashboard/router.ex b/lib/phoenix/live_dashboard/router.ex index 08b58966..27e3be63 100644 --- a/lib/phoenix/live_dashboard/router.ex +++ b/lib/phoenix/live_dashboard/router.ex @@ -126,6 +126,7 @@ defmodule Phoenix.LiveDashboard.Router do unless Module.get_attribute(__MODULE__, :live_dashboard_prefix) do @live_dashboard_prefix Phoenix.Router.scoped_path(__MODULE__, path) + |> String.replace_suffix("/", "") def __live_dashboard_prefix__, do: @live_dashboard_prefix end end