forked from mirrors/akkoma
use nil instead of empty string
This commit is contained in:
parent
dffde6631d
commit
066fe1a697
2 changed files with 3 additions and 3 deletions
|
@ -42,7 +42,7 @@ version = with {version, 0} <- System.cmd("git", ["rev-parse", "HEAD"]) do
|
||||||
|
|
||||||
# Configures http settings, upstream proxy etc.
|
# Configures http settings, upstream proxy etc.
|
||||||
config :pleroma, :http,
|
config :pleroma, :http,
|
||||||
proxy_url: ""
|
proxy_url: nil
|
||||||
|
|
||||||
config :pleroma, :instance,
|
config :pleroma, :instance,
|
||||||
version: version,
|
version: version,
|
||||||
|
|
|
@ -4,9 +4,9 @@ defmodule Pleroma.HTTP do
|
||||||
|
|
||||||
def process_request_options(options) do
|
def process_request_options(options) do
|
||||||
config = Application.get_env(:pleroma, :http, [])
|
config = Application.get_env(:pleroma, :http, [])
|
||||||
proxy = Keyword.get(config, :proxy_url, "")
|
proxy = Keyword.get(config, :proxy_url, nil)
|
||||||
case proxy do
|
case proxy do
|
||||||
"" -> options
|
nil -> options
|
||||||
_ -> options ++ [proxy: proxy]
|
_ -> options ++ [proxy: proxy]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue