From 066fe1a697286e38c9e9ef7f2c273c4e7a50ffdc Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Mon, 29 Jan 2018 10:06:16 -0500 Subject: [PATCH] use nil instead of empty string --- config/config.exs | 2 +- lib/pleroma/http/http.ex | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/config.exs b/config/config.exs index 05995085c..e71d5e5a0 100644 --- a/config/config.exs +++ b/config/config.exs @@ -42,7 +42,7 @@ version = with {version, 0} <- System.cmd("git", ["rev-parse", "HEAD"]) do # Configures http settings, upstream proxy etc. config :pleroma, :http, - proxy_url: "" + proxy_url: nil config :pleroma, :instance, version: version, diff --git a/lib/pleroma/http/http.ex b/lib/pleroma/http/http.ex index 31135411c..8b8a82353 100644 --- a/lib/pleroma/http/http.ex +++ b/lib/pleroma/http/http.ex @@ -4,9 +4,9 @@ defmodule Pleroma.HTTP do def process_request_options(options) do config = Application.get_env(:pleroma, :http, []) - proxy = Keyword.get(config, :proxy_url, "") + proxy = Keyword.get(config, :proxy_url, nil) case proxy do - "" -> options + nil -> options _ -> options ++ [proxy: proxy] end end -- 2.45.2