Move LiveDashboard to /pleroma/live_dashboard

This commit is contained in:
Phantasm 2026-01-09 11:41:12 +01:00
commit 5e114931f5
No known key found for this signature in database
GPG key ID: 2669E588BCC634C8
5 changed files with 15 additions and 5 deletions

View file

@ -29,6 +29,11 @@ defmodule Pleroma.Web.Fallback.RedirectController do
)
end
def live_dashboard(conn, _params) do
conn
|> redirect(to: "/pleroma/live_dashboard")
end
def redirector(conn, _params, code \\ 200) do
{:ok, index_content} = File.read(index_file_path(conn))

View file

@ -1044,7 +1044,7 @@ defmodule Pleroma.Web.Router do
scope "/" do
pipe_through([:pleroma_html, :authenticate, :require_admin])
live_dashboard("/phoenix/live_dashboard", additional_pages: [oban: Oban.LiveDashboard])
live_dashboard("/pleroma/live_dashboard", additional_pages: [oban: Oban.LiveDashboard])
oban_dashboard("/pleroma/oban")
end
@ -1086,15 +1086,15 @@ defmodule Pleroma.Web.Router do
get("/:maybe_nickname_or_id", RedirectController, :redirector_with_meta)
match(:*, "/api/pleroma/*path", LegacyPleromaApiRerouterPlug, [])
get("/api/*path", RedirectController, :api_not_implemented)
get("/phoenix/live_dashboard", RedirectController, :live_dashboard)
get("/*path", RedirectController, :redirector_with_preload)
options("/*path", RedirectController, :empty)
end
# /pleroma/oban/* needs to get filtered out from api routes for frontend configuration
# /pleroma/{phoenix,oban}/* need to get filtered out from api routes for frontend configuration
# to not drop admin overrides for /pleroma/admin.
# Also removing /phoenix since it is not an API route
@non_api_routes ["/phoenix/live_dashboard", "/pleroma/oban"]
@non_api_routes ["/pleroma/live_dashboard", "/pleroma/oban"]
def get_api_routes do
Phoenix.Router.routes(__MODULE__)