projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
default pool for tz_data client
[akkoma]
/
lib
/
pleroma
/
plugs
/
instance_static.ex
diff --git
a/lib/pleroma/plugs/instance_static.ex
b/lib/pleroma/plugs/instance_static.ex
index 18255eac369e17ee33c2f859d754349ee4761040..0fb57e42257f5927cd6c7e6299782d8526ff9c4f 100644
(file)
--- a/
lib/pleroma/plugs/instance_static.ex
+++ b/
lib/pleroma/plugs/instance_static.ex
@@
-16,11
+16,11
@@
defmodule Pleroma.Plugs.InstanceStatic 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)
- if File.exists?(instance_path) do
- instance_path
- else
+ frontend_path = Pleroma.Plugs.FrontendStatic.file_path(path, :primary)
+
+ (File.exists?(instance_path) && instance_path) ||
+ (frontend_path && File.exists?(frontend_path) && frontend_path) ||
Path.join(Application.app_dir(:pleroma, "priv/static/"), path)
Path.join(Application.app_dir(:pleroma, "priv/static/"), path)
- end
end
def init(opts) do
end
def init(opts) do