diff options
Diffstat (limited to 'lib/pleroma/web/router.ex')
-rw-r--r-- | lib/pleroma/web/router.ex | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/pleroma/web/router.ex b/lib/pleroma/web/router.ex index 914cd6a6d..ad97698dd 100644 --- a/lib/pleroma/web/router.ex +++ b/lib/pleroma/web/router.ex @@ -449,11 +449,11 @@ defmodule Fallback.RedirectController do def redirector(conn, _params) do conn |> put_resp_content_type("text/html") - |> send_file(200, Application.app_dir(:pleroma, "priv/static/index.html")) + |> send_file(200, index_file_path()) end def redirector_with_meta(conn, params) do - {:ok, index_content} = File.read(Application.app_dir(:pleroma, "priv/static/index.html")) + {:ok, index_content} = File.read(index_file_path()) tags = Metadata.build_tags(params) response = String.replace(index_content, "<!--server-generated-meta-->", tags) @@ -462,6 +462,10 @@ defmodule Fallback.RedirectController do |> send_resp(200, response) end + def index_file_path do + Application.app_dir(:pleroma, "priv/static/index.html") + end + def registration_page(conn, params) do redirector(conn, params) end |