Endpoint: Serve a dynamically configured admin interface
authorlain <lain@soykaf.club>
Wed, 29 Jul 2020 11:03:04 +0000 (13:03 +0200)
committerlain <lain@soykaf.club>
Wed, 29 Jul 2020 11:03:04 +0000 (13:03 +0200)
lib/pleroma/web/endpoint.ex

index 527fb288d39766e101ead334d0571904e10dce46..8b153763d53ab61d674e1eb27b6d1e15f8d64541 100644 (file)
@@ -39,6 +39,18 @@ defmodule Pleroma.Web.Endpoint do
     }
   )
 
+  plug(Plug.Static.IndexHtml, at: "/pleroma/admin/")
+
+  plug(Pleroma.Plugs.FrontendStatic,
+    at: "/pleroma/admin",
+    frontend_type: :admin,
+    gzip: true,
+    cache_control_for_etags: @static_cache_control,
+    headers: %{
+      "cache-control" => @static_cache_control
+    }
+  )
+
   # Serve at "/" the static files from "priv/static" directory.
   #
   # You should set gzip to true if you are running phoenix.digest
@@ -56,8 +68,6 @@ defmodule Pleroma.Web.Endpoint do
     }
   )
 
-  plug(Plug.Static.IndexHtml, at: "/pleroma/admin/")
-
   plug(Plug.Static,
     at: "/pleroma/admin/",
     from: {:pleroma, "priv/static/adminfe/"}