aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/endpoint.ex
diff options
context:
space:
mode:
authorhref <href@random.sh>2018-12-17 22:50:59 +0100
committerhref <href@random.sh>2018-12-17 22:50:59 +0100
commitb1860fe85af1d32de937f466ba65d03614952e31 (patch)
tree9b1239247d38a2aaa60627fc9bd4db44ed67d136 /lib/pleroma/web/endpoint.ex
parent3879500c87829a5cf1377ca7ccdb7bf92c75367f (diff)
downloadpleroma-b1860fe85af1d32de937f466ba65d03614952e31.tar.gz
Instance/Static runtime plug
This allows to set-up an arbitrary directory which overrides most of the static files: index.html static/ emoji/ packs/ sounds/ images/ instance/ favicon.png. If the files are not present in the directory, the bundled ones in priv/static will be used.
Diffstat (limited to 'lib/pleroma/web/endpoint.ex')
-rw-r--r--lib/pleroma/web/endpoint.ex4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/pleroma/web/endpoint.ex b/lib/pleroma/web/endpoint.ex
index e52667c72..d79f61b2e 100644
--- a/lib/pleroma/web/endpoint.ex
+++ b/lib/pleroma/web/endpoint.ex
@@ -12,6 +12,10 @@ defmodule Pleroma.Web.Endpoint do
plug(Pleroma.Plugs.UploadedMedia)
+ # InstanceStatic needs to be before Plug.Static to be able to override shipped-static files
+ # If you're adding new paths to `only:` you'll need to configure them in InstanceStatic as well
+ plug(Pleroma.Plugs.InstanceStatic, at: "/")
+
plug(
Plug.Static,
at: "/",