diff options
author | Mark Felder <feld@feld.me> | 2021-04-09 10:30:27 -0500 |
---|---|---|
committer | Mark Felder <feld@feld.me> | 2021-04-09 10:30:27 -0500 |
commit | 0feafcc20cec168258f592b9d509c1e6ccc8efba (patch) | |
tree | e95b7b831f0358b55f8558c379411fb23fb7ef9e | |
parent | f8cef70416b5da5fabdac89ad95589e735fe85a9 (diff) | |
download | pleroma-0feafcc20cec168258f592b9d509c1e6ccc8efba.tar.gz |
Use URI.merge to prevent concatenating two canonical URLs when a custom instance thumbnail was uploaded via AdminFE
-rw-r--r-- | lib/pleroma/web/mastodon_api/views/instance_view.ex | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pleroma/web/mastodon_api/views/instance_view.ex b/lib/pleroma/web/mastodon_api/views/instance_view.ex index 73205fb6d..dac68d8e6 100644 --- a/lib/pleroma/web/mastodon_api/views/instance_view.ex +++ b/lib/pleroma/web/mastodon_api/views/instance_view.ex @@ -23,7 +23,8 @@ defmodule Pleroma.Web.MastodonAPI.InstanceView do streaming_api: Pleroma.Web.Endpoint.websocket_url() }, stats: Pleroma.Stats.get_stats(), - thumbnail: Pleroma.Web.base_url() <> Keyword.get(instance, :instance_thumbnail), + thumbnail: + URI.merge(Pleroma.Web.base_url(), Keyword.get(instance, :instance_thumbnail)) |> to_string, languages: ["en"], registrations: Keyword.get(instance, :registrations_open), approval_required: Keyword.get(instance, :account_approval_required), |