diff options
author | Jeff Becker <jeff@i2p.rocks> | 2017-12-30 11:35:53 -0500 |
---|---|---|
committer | Jeff Becker <jeff@i2p.rocks> | 2017-12-30 13:08:36 -0500 |
commit | 5ddd15d794bc8f9be3ca073589bab1f92b001cce (patch) | |
tree | 5b92b9669386feec0304a75c26f93f9e9bd5d34c /lib | |
parent | 5c09d8d3f199a3f323471f9ba4578371226cd726 (diff) | |
download | pleroma-5ddd15d794bc8f9be3ca073589bab1f92b001cce.tar.gz |
make httppoison use configurable http proxy
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/http/http.ex | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/pleroma/http/http.ex b/lib/pleroma/http/http.ex new file mode 100644 index 000000000..31135411c --- /dev/null +++ b/lib/pleroma/http/http.ex @@ -0,0 +1,14 @@ + +defmodule Pleroma.HTTP do + use HTTPoison.Base + + def process_request_options(options) do + config = Application.get_env(:pleroma, :http, []) + proxy = Keyword.get(config, :proxy_url, "") + case proxy do + "" -> options + _ -> options ++ [proxy: proxy] + end + end + +end |