From 2756606f5ca5976fd1fe9bcf5b7bd1d0d543f978 Mon Sep 17 00:00:00 2001 From: Jacques Lorentz <34100034+jacqueslorentz@users.noreply.github.com> Date: Thu, 21 Mar 2024 17:08:19 +0100 Subject: [PATCH] Fix auth redirect with specific base url path (#2516) --- lib/livebook_web/controllers/auth_controller.ex | 2 +- lib/livebook_web/live/hub/edit_live.ex | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/livebook_web/controllers/auth_controller.ex b/lib/livebook_web/controllers/auth_controller.ex index e889c84fc..eebfc9076 100644 --- a/lib/livebook_web/controllers/auth_controller.ex +++ b/lib/livebook_web/controllers/auth_controller.ex @@ -65,7 +65,7 @@ defmodule LivebookWeb.AuthController do |> delete_session(:redirect_to) |> redirect(to: redirect_to) else - redirect(conn, to: "/") + redirect(conn, to: ~p"/") end end) |> halt() diff --git a/lib/livebook_web/live/hub/edit_live.ex b/lib/livebook_web/live/hub/edit_live.ex index 9c648a4e1..20794d7de 100644 --- a/lib/livebook_web/live/hub/edit_live.ex +++ b/lib/livebook_web/live/hub/edit_live.ex @@ -88,7 +88,7 @@ defmodule LivebookWeb.Hub.EditLive do socket |> put_flash(:success, "Hub deleted successfully") - |> push_navigate(to: "/") + |> push_navigate(to: ~p"/") end {:noreply,