Merge branch 'manifest' into 'develop'
authorAlex Gleason <alex@alexgleason.me>
Sun, 19 Dec 2021 18:18:59 +0000 (18:18 +0000)
committerAlex Gleason <alex@alexgleason.me>
Sun, 19 Dec 2021 18:18:59 +0000 (18:18 +0000)
Expose /manifest.json for PWA

Closes #882

See merge request pleroma/pleroma!3544

1  2 
lib/pleroma/web/router.ex
test/pleroma/web/plugs/frontend_static_plug_test.exs

index 3f708a9855c338611395441837be3034cba14b1c,c1713c6cf1d93ef53910f17b3b10ec185ce81c0e..fa1d1b93f104c79bc256a363f1223dfabf17e641
@@@ -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"])
      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)
  
      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 [
index 45cd70a2c32cf80f8b6932cd18e08e1f773139b2,031f7a69d788469ef1205f65dc8c431514fec5ab..52379b86a6d3355cb0076afb47228afc198bde74
@@@ -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"