diff options
Diffstat (limited to 'lib/pleroma/web/router.ex')
-rw-r--r-- | lib/pleroma/web/router.ex | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/lib/pleroma/web/router.ex b/lib/pleroma/web/router.ex index 386308362..e25ffd317 100644 --- a/lib/pleroma/web/router.ex +++ b/lib/pleroma/web/router.ex @@ -464,7 +464,8 @@ defmodule Pleroma.Web.Router do pipe_through(:authenticated_api) # Backend-obscure settings blob for MastoFE, don't parse/reuse elsewhere - put("/settings", MastoFEController, :put_settings) + # put("/settings", MastoFEController, :put_settings) + put("/settings", FrontendController, :put_settings, as: :frontend_mastodon) end scope "/api/v1", Pleroma.Web.MastodonAPI do @@ -547,7 +548,6 @@ defmodule Pleroma.Web.Router do pipeline :ostatus do plug(:accepts, ["html", "xml", "rss", "atom", "activity+json", "json"]) - plug(Pleroma.Plugs.StaticFEPlug) end pipeline :oembed do @@ -652,7 +652,7 @@ defmodule Pleroma.Web.Router do scope "/", Pleroma.Web do pipe_through(:api) - get("/web/manifest.json", MastoFEController, :manifest) + get("/web/manifest.json", FrontendController, :manifest, as: :frontend_mastodon) end scope "/", Pleroma.Web do @@ -663,8 +663,7 @@ defmodule Pleroma.Web.Router do post("/auth/password", MastodonAPI.AuthController, :password_reset) - get("/web/*path", MastoFEController, :index) - + get("/web/*path", FrontendController, :index, as: :frontend_mastodon) get("/embed/:id", EmbedController, :show) end @@ -714,12 +713,16 @@ defmodule Pleroma.Web.Router do get("/check_password", MongooseIMController, :check_password) end - scope "/", Fallback do - get("/registration/:token", RedirectController, :registration_page) - get("/:maybe_nickname_or_id", RedirectController, :redirector_with_meta) - get("/api*path", RedirectController, :api_not_implemented) - get("/*path", RedirectController, :redirector_with_preload) + scope "/pleroma/admin", Pleroma.Web do + get("/*path", FrontendController, :index, as: :frontend_admin) + end + + scope "/", Pleroma.Web do + get("/registration/:token", FrontendController, :registration_page) + get("/:maybe_nickname_or_id", FrontendController, :index_with_meta) + get("/api*path", FrontendController, :api_not_implemented) + get("/*path", FrontendController, :index) - options("/*path", RedirectController, :empty) + options("/*path", FrontendController, :empty) end end |