mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2025-04-23 21:39:18 -04:00
plugs/instance_static: use pipeline fallback for serving frontend
This commit is contained in:
parent
58f646bcda
commit
f41a76c22f
1 changed files with 2 additions and 4 deletions
|
@ -16,11 +16,9 @@ defmodule Pleroma.Web.Plugs.InstanceStatic do
|
|||
instance_path =
|
||||
Path.join(Pleroma.Config.get([:instance, :static_dir], "instance/static/"), path)
|
||||
|
||||
frontend_path = Pleroma.Web.Plugs.FrontendStatic.file_path(path, :primary)
|
||||
static_path = Path.join(Application.app_dir(:pleroma, "priv/static/"), path)
|
||||
|
||||
(File.exists?(instance_path) && instance_path) ||
|
||||
(frontend_path && File.exists?(frontend_path) && frontend_path) ||
|
||||
Path.join(Application.app_dir(:pleroma, "priv/static/"), path)
|
||||
(File.exists?(instance_path) && instance_path) || (File.exists?(static_path) && static_path)
|
||||
end
|
||||
|
||||
def init(opts) do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue