Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pleroma
pleroma
Commits
5ddd15d7
Unverified
Commit
5ddd15d7
authored
Dec 30, 2017
by
jeff
Browse files
make httppoison use configurable http proxy
parent
5c09d8d3
Changes
2
Hide whitespace changes
Inline
Side-by-side
config/config.exs
View file @
5ddd15d7
...
...
@@ -32,7 +32,7 @@
config
:pleroma
,
:websub
,
Pleroma
.
Web
.
Websub
config
:pleroma
,
:ostatus
,
Pleroma
.
Web
.
OStatus
config
:pleroma
,
:httpoison
,
HTTPoison
config
:pleroma
,
:httpoison
,
Pleroma
.
HTTP
version
=
with
{
version
,
0
}
<-
System
.
cmd
(
"git"
,
[
"rev-parse"
,
"HEAD"
])
do
"Pleroma
#{
String
.
trim
(
version
)
}
"
...
...
@@ -40,6 +40,9 @@
_
->
"Pleroma dev"
end
config
:pleroma
,
:http
,
proxy_url:
""
config
:pleroma
,
:instance
,
version:
version
,
name:
"Pleroma"
,
...
...
lib/pleroma/http/http.ex
0 → 100644
View file @
5ddd15d7
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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment