From: Alex Gleason Date: Sun, 19 Dec 2021 18:18:59 +0000 (+0000) Subject: Merge branch 'manifest' into 'develop' X-Git-Url: http://git.squeep.com/?a=commitdiff_plain;h=b0d2b539347f75b15bdeb38d80ff4e0d8dc9fec5;hp=-c;p=akkoma Merge branch 'manifest' into 'develop' Expose /manifest.json for PWA Closes #882 See merge request pleroma/pleroma!3544 --- b0d2b539347f75b15bdeb38d80ff4e0d8dc9fec5 diff --combined lib/pleroma/web/router.ex index 3f708a985,c1713c6cf..fa1d1b93f --- a/lib/pleroma/web/router.ex +++ b/lib/pleroma/web/router.ex @@@ -4,7 -4,6 +4,7 @@@ defmodule Pleroma.Web.Router do use Pleroma.Web, :router + import Phoenix.LiveDashboard.Router pipeline :accepts_html do plug(:accepts, ["html"]) @@@ -743,6 -742,12 +743,12 @@@ get("/:version", Nodeinfo.NodeinfoController, :nodeinfo) end + scope "/", Pleroma.Web do + pipe_through(:api) + + get("/manifest.json", ManifestController, :show) + end + scope "/", Pleroma.Web do pipe_through(:pleroma_html) @@@ -764,11 -769,6 +770,11 @@@ end end + scope "/" do + pipe_through([:pleroma_html, :authenticate, :require_admin]) + live_dashboard("/phoenix/live_dashboard") + end + # Test-only routes needed to test action dispatching and plug chain execution if Pleroma.Config.get(:env) == :test do @test_actions [ diff --combined test/pleroma/web/plugs/frontend_static_plug_test.exs index 45cd70a2c,031f7a69d..52379b86a --- a/test/pleroma/web/plugs/frontend_static_plug_test.exs +++ b/test/pleroma/web/plugs/frontend_static_plug_test.exs @@@ -94,9 -94,9 +94,10 @@@ defmodule Pleroma.Web.Plugs.FrontendSta "internal", ".well-known", "nodeinfo", + "manifest.json", "auth", "proxy", + "phoenix", "test", "user_exists", "check_password"