Commit d3b8cd34 authored by kaniini's avatar kaniini
Browse files

http: request builder: send user-agent when making requests

parent d2dacadb
Pipeline #11999 failed with stages
in 8 minutes and 31 seconds
......@@ -45,8 +45,9 @@ def url(request, u) do
Add headers to the request
@spec headers(map(), list(tuple)) :: map()
def headers(request, h) do
Map.put_new(request, :headers, h)
def headers(request, header_list) do
header_list = header_list ++ [{"User-Agent", Pleroma.Application.user_agent()}]
Map.put_new(request, :headers, header_list)
@doc """
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment