projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'upstream/develop' into admin-create-users
[akkoma]
/
lib
/
pleroma
/
reverse_proxy.ex
diff --git
a/lib/pleroma/reverse_proxy.ex
b/lib/pleroma/reverse_proxy.ex
index a3f177fec06d4ea8ab3da7e41d9a159663ca02ff..983e156f53237a2120b92ec0d82fd2b412240c4e 100644
(file)
--- a/
lib/pleroma/reverse_proxy.ex
+++ b/
lib/pleroma/reverse_proxy.ex
@@
-3,6
+3,8
@@
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.ReverseProxy do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.ReverseProxy do
+ alias Pleroma.HTTP
+
@keep_req_headers ~w(accept user-agent accept-encoding cache-control if-modified-since) ++
~w(if-unmodified-since if-none-match if-range range)
@resp_cache_headers ~w(etag date last-modified cache-control)
@keep_req_headers ~w(accept user-agent accept-encoding cache-control if-modified-since) ++
~w(if-unmodified-since if-none-match if-range range)
@resp_cache_headers ~w(etag date last-modified cache-control)
@@
-59,8
+61,7
@@
defmodule Pleroma.ReverseProxy do
* `http`: options for [hackney](https://github.com/benoitc/hackney).
"""
* `http`: options for [hackney](https://github.com/benoitc/hackney).
"""
- @hackney Application.get_env(:pleroma, :hackney, :hackney)
- @httpoison Application.get_env(:pleroma, :httpoison, HTTPoison)
+ @hackney Pleroma.Config.get(:hackney, :hackney)
@default_hackney_options []
@default_hackney_options []
@@
-97,7
+98,7
@@
defmodule Pleroma.ReverseProxy do
hackney_opts =
@default_hackney_options
|> Keyword.merge(Keyword.get(opts, :http, []))
hackney_opts =
@default_hackney_options
|> Keyword.merge(Keyword.get(opts, :http, []))
- |>
@httpoison
.process_request_options()
+ |>
HTTP
.process_request_options()
req_headers = build_req_headers(conn.req_headers, opts)
req_headers = build_req_headers(conn.req_headers, opts)