Skip to content
Snippets Groups Projects
Verified Commit a8028c53 authored by Alex Gleason's avatar Alex Gleason
Browse files

Fix favicon scraper

parent d1a6f67b
Branches emoji-upload
No related tags found
No related merge requests found
Pipeline #30437 passed
......@@ -35,7 +35,10 @@ def url(request, u), do: %{request | url: u}
def headers(request, headers) do
headers_list =
with true <- Pleroma.Config.get([:http, :send_user_agent]),
nil <- Enum.find(headers, fn {key, _val} -> String.downcase(key) == "user-agent" end) do
nil <-
Enum.find(headers, fn {key, _val} ->
String.downcase(to_string(key)) == "user-agent"
end) do
[{"user-agent", Pleroma.Application.user_agent()} | headers]
else
_ ->
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment