Remove configurability of upload proxy opts, simplify
This commit is contained in:
parent
18296c7473
commit
d69c78ceb9
|
@ -63,14 +63,6 @@
|
||||||
filters: [Pleroma.Upload.Filter.Dedupe],
|
filters: [Pleroma.Upload.Filter.Dedupe],
|
||||||
link_name: false,
|
link_name: false,
|
||||||
proxy_remote: false,
|
proxy_remote: false,
|
||||||
proxy_opts: [
|
|
||||||
redirect_on_failure: false,
|
|
||||||
max_body_length: 25 * 1_048_576,
|
|
||||||
http: [
|
|
||||||
follow_redirect: true,
|
|
||||||
pool: :upload
|
|
||||||
]
|
|
||||||
],
|
|
||||||
filename_display_max_length: 30,
|
filename_display_max_length: 30,
|
||||||
default_description: nil
|
default_description: nil
|
||||||
|
|
||||||
|
|
|
@ -87,8 +87,15 @@ defp get_media(conn, {:static_dir, directory}, _, opts) do
|
||||||
end
|
end
|
||||||
|
|
||||||
defp get_media(conn, {:url, url}, true, _) do
|
defp get_media(conn, {:url, url}, true, _) do
|
||||||
|
proxy_opts = [
|
||||||
|
http: [
|
||||||
|
follow_redirect: true,
|
||||||
|
pool: :upload
|
||||||
|
]
|
||||||
|
]
|
||||||
|
|
||||||
conn
|
conn
|
||||||
|> Pleroma.ReverseProxy.call(url, Pleroma.Config.get([Pleroma.Upload, :proxy_opts], []))
|
|> Pleroma.ReverseProxy.call(url, proxy_opts)
|
||||||
end
|
end
|
||||||
|
|
||||||
defp get_media(conn, {:url, url}, _, _) do
|
defp get_media(conn, {:url, url}, _, _) do
|
||||||
|
|
Loading…
Reference in New Issue