diff options
author | lain <lain@soykaf.club> | 2020-08-25 10:34:09 +0000 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-08-25 10:34:09 +0000 |
commit | 361aa22e2862c1c914baf8257fdc8b20cbc7941d (patch) | |
tree | e306f33dcd26fad9751a111a87efe78ac438a1a7 /lib/pleroma | |
parent | 5722b0e2e5e7113f0422798a6ea8cc40d1953291 (diff) | |
parent | 6d6e43fd09a66740d447e77e9878d9d35bc07414 (diff) | |
download | pleroma-361aa22e2862c1c914baf8257fdc8b20cbc7941d.tar.gz |
Merge branch 'frontend-bundles-downloads' into 'develop'
frontend install mix tasks
See merge request pleroma/pleroma!2841
Diffstat (limited to 'lib/pleroma')
-rw-r--r-- | lib/pleroma/plugs/frontend_static.ex | 1 | ||||
-rw-r--r-- | lib/pleroma/web/endpoint.ex | 14 |
2 files changed, 13 insertions, 2 deletions
diff --git a/lib/pleroma/plugs/frontend_static.ex b/lib/pleroma/plugs/frontend_static.ex index f549ca75f..11a0d5382 100644 --- a/lib/pleroma/plugs/frontend_static.ex +++ b/lib/pleroma/plugs/frontend_static.ex @@ -30,6 +30,7 @@ defmodule Pleroma.Plugs.FrontendStatic do opts |> Keyword.put(:from, "__unconfigured_frontend_static_plug") |> Plug.Static.init() + |> Map.put(:frontend_type, opts[:frontend_type]) end def call(conn, opts) do diff --git a/lib/pleroma/web/endpoint.ex b/lib/pleroma/web/endpoint.ex index 527fb288d..8b153763d 100644 --- a/lib/pleroma/web/endpoint.ex +++ b/lib/pleroma/web/endpoint.ex @@ -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/"} |