From: raeno Date: Tue, 18 Dec 2018 13:59:32 +0000 (+0100) Subject: Merge branch 'develop' into oembed_provider X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=a3003364598b42849e384a216948dad810481f51;p=akkoma Merge branch 'develop' into oembed_provider --- a3003364598b42849e384a216948dad810481f51 diff --cc lib/pleroma/web/router.ex index 751624e80,dd1985d6e..49b007422 --- a/lib/pleroma/web/router.ex +++ b/lib/pleroma/web/router.ex @@@ -467,21 -459,7 +470,21 @@@ defmodule Fallback.RedirectController d def redirector(conn, _params) do conn |> put_resp_content_type("text/html") - |> send_file(200, Pleroma.Plugs.InstanceStatic.file_path("index.html")) + |> send_file(200, index_file_path()) + end + + def redirector_with_meta(conn, params) do + {:ok, index_content} = File.read(index_file_path()) + tags = Metadata.build_tags(params) + response = String.replace(index_content, "", tags) + + conn + |> put_resp_content_type("text/html") + |> send_resp(200, response) + end + + def index_file_path do - Application.app_dir(:pleroma, "priv/static/index.html") ++ Pleroma.Plugs.InstanceStatic.file_path("index.html")) end def registration_page(conn, params) do