projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
in dev, allow dev FE
[akkoma]
/
lib
/
pleroma
/
web
/
plugs
/
instance_static.ex
diff --git
a/lib/pleroma/web/plugs/instance_static.ex
b/lib/pleroma/web/plugs/instance_static.ex
index 54b9175df1ff0dc6d8e500e31829d1998a6b806a..5f9a6ee83e68390a9d6e5ce4f1575a82c859ab76 100644
(file)
--- a/
lib/pleroma/web/plugs/instance_static.ex
+++ b/
lib/pleroma/web/plugs/instance_static.ex
@@
-1,5
+1,5
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-202
0
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-202
1
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.Plugs.InstanceStatic do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.Plugs.InstanceStatic do
@@
-12,11
+12,11
@@
defmodule Pleroma.Web.Plugs.InstanceStatic do
"""
@behaviour Plug
"""
@behaviour Plug
- def file_path(path) do
+ def file_path(path
, frontend_type \\ :primary
) do
instance_path =
Path.join(Pleroma.Config.get([:instance, :static_dir], "instance/static/"), path)
instance_path =
Path.join(Pleroma.Config.get([:instance, :static_dir], "instance/static/"), path)
- frontend_path = Pleroma.Web.Plugs.FrontendStatic.file_path(path,
:primary
)
+ frontend_path = Pleroma.Web.Plugs.FrontendStatic.file_path(path,
frontend_type
)
(File.exists?(instance_path) && instance_path) ||
(frontend_path && File.exists?(frontend_path) && frontend_path) ||
(File.exists?(instance_path) && instance_path) ||
(frontend_path && File.exists?(frontend_path) && frontend_path) ||