add ability to set a custom user-agent string
This commit is contained in:
parent
34cdbcbb64
commit
d3656c2725
4 changed files with 26 additions and 2 deletions
|
|
@ -17,8 +17,14 @@ defmodule Pleroma.Application do
|
|||
def repository, do: @repository
|
||||
|
||||
def user_agent do
|
||||
info = "#{Pleroma.Web.base_url()} <#{Pleroma.Config.get([:instance, :email], "")}>"
|
||||
named_version() <> "; " <> info
|
||||
case Pleroma.Config.get([:http, :user_agent], :default) do
|
||||
:default ->
|
||||
info = "#{Pleroma.Web.base_url()} <#{Pleroma.Config.get([:instance, :email], "")}>"
|
||||
named_version() <> "; " <> info
|
||||
|
||||
custom ->
|
||||
custom
|
||||
end
|
||||
end
|
||||
|
||||
# See http://elixir-lang.org/docs/stable/elixir/Application.html
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue