aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/rich_media
diff options
context:
space:
mode:
authorAlex Gleason <alex@alexgleason.me>2020-07-16 14:51:36 -0500
committerAlex Gleason <alex@alexgleason.me>2020-07-16 14:51:36 -0500
commit38425ebdbf157377ccb0402f78dc3d02f81c55f5 (patch)
tree740f32837d28e918f097c948d89827d99434d5b2 /lib/pleroma/web/rich_media
parent8daacc911498d827fd68ea3d34eb1be9ae4a1ffe (diff)
parent3a2b2cb6f2d6ce39ae0d246649189c021c535992 (diff)
downloadpleroma-38425ebdbf157377ccb0402f78dc3d02f81c55f5.tar.gz
Merge remote-tracking branch 'upstream/develop' into linkify
Diffstat (limited to 'lib/pleroma/web/rich_media')
-rw-r--r--lib/pleroma/web/rich_media/parser.ex5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/pleroma/web/rich_media/parser.ex b/lib/pleroma/web/rich_media/parser.ex
index ef5ead2da..c8a767935 100644
--- a/lib/pleroma/web/rich_media/parser.ex
+++ b/lib/pleroma/web/rich_media/parser.ex
@@ -86,7 +86,10 @@ defmodule Pleroma.Web.RichMedia.Parser do
end
try do
- {:ok, %Tesla.Env{body: html}} = Pleroma.HTTP.get(url, [], adapter: opts)
+ rich_media_agent = Pleroma.Application.user_agent() <> "; Bot"
+
+ {:ok, %Tesla.Env{body: html}} =
+ Pleroma.HTTP.get(url, [{"user-agent", rich_media_agent}], adapter: opts)
html
|> parse_html()