X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Ffallback%2Fredirect_controller.ex;h=5fca290e56d4ec6a780826dfe46a10d0aae7bc5f;hb=46948537664a4296e7d5c517cbdbf3adccef1272;hp=a7b36a34b7b1253cf404c42483d2377a8be94abe;hpb=0374df1d12a4c28fac72be9b9c0545d318c10385;p=akkoma
diff --git a/lib/pleroma/web/fallback/redirect_controller.ex b/lib/pleroma/web/fallback/redirect_controller.ex
index a7b36a34b..5fca290e5 100644
--- a/lib/pleroma/web/fallback/redirect_controller.ex
+++ b/lib/pleroma/web/fallback/redirect_controller.ex
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors
+# Copyright © 2017-2021 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.Fallback.RedirectController do
@@ -37,10 +37,11 @@ defmodule Pleroma.Web.Fallback.RedirectController do
tags = build_tags(conn, params)
preloads = preload_data(conn, params)
+ title = "
#{Pleroma.Config.get([:instance, :name])}"
response =
index_content
- |> String.replace("", tags <> preloads)
+ |> String.replace("", tags <> preloads <> title)
conn
|> put_resp_content_type("text/html")
@@ -54,10 +55,11 @@ defmodule Pleroma.Web.Fallback.RedirectController do
def redirector_with_preload(conn, params) do
{:ok, index_content} = File.read(index_file_path())
preloads = preload_data(conn, params)
+ title = "#{Pleroma.Config.get([:instance, :name])}"
response =
index_content
- |> String.replace("", preloads)
+ |> String.replace("", preloads <> title)
conn
|> put_resp_content_type("text/html")
@@ -75,7 +77,7 @@ defmodule Pleroma.Web.Fallback.RedirectController do
end
defp index_file_path do
- Pleroma.Plugs.InstanceStatic.file_path("index.html")
+ Pleroma.Web.Plugs.InstanceStatic.file_path("index.html")
end
defp build_tags(conn, params) do