more fixes
This commit is contained in:
parent
b11eeb48c4
commit
5177d589d7
@ -13,9 +13,6 @@ defmodule Pleroma.Web.MediaProxy.MediaProxyController do
|
||||
with config <- Pleroma.Config.get([:media_proxy], []),
|
||||
true <- Keyword.get(config, :enabled, false),
|
||||
{:ok, url} <- MediaProxy.decode_url(sig64, url64),
|
||||
IO.inspect(sig64),
|
||||
IO.inspect(url64),
|
||||
IO.inspect(url),
|
||||
:ok <- filename_matches(params, conn.request_path, url) do
|
||||
ReverseProxy.call(conn, url, Keyword.get(config, :proxy_opts, @default_proxy_opts))
|
||||
else
|
||||
|
@ -180,7 +180,7 @@ defmodule Gun.ConnectionsTest do
|
||||
|
||||
test "opens connection and reuse it on next request", %{name: name} do
|
||||
api = Pleroma.Config.get([API])
|
||||
Pleroma.Config.put([API], :gun)
|
||||
Pleroma.Config.put([API], API.Gun)
|
||||
on_exit(fn -> Pleroma.Config.put([API], api) end)
|
||||
conn = Connections.get_conn("http://httpbin.org", [], name)
|
||||
|
||||
@ -204,7 +204,7 @@ defmodule Gun.ConnectionsTest do
|
||||
|
||||
test "opens ssl connection and reuse it on next request", %{name: name} do
|
||||
api = Pleroma.Config.get([API])
|
||||
Pleroma.Config.put([API], :gun)
|
||||
Pleroma.Config.put([API], API.Gun)
|
||||
on_exit(fn -> Pleroma.Config.put([API], api) end)
|
||||
conn = Connections.get_conn("https://httpbin.org", [], name)
|
||||
|
||||
|
@ -323,7 +323,7 @@ defmodule Pleroma.ReverseProxyTest do
|
||||
Application.put_env(:tesla, :adapter, Tesla.Adapter.Gun)
|
||||
|
||||
api = Pleroma.Config.get([Pleroma.Gun.API])
|
||||
Pleroma.Config.put([Pleroma.Gun.API], :gun)
|
||||
Pleroma.Config.put([Pleroma.Gun.API], Pleroma.Gun.API.Gun)
|
||||
{:ok, _} = Pleroma.Gun.Connections.start_link(Pleroma.Gun.Connections)
|
||||
|
||||
conn = ReverseProxy.call(conn, "http://httpbin.org/stream-bytes/10")
|
||||
@ -346,7 +346,7 @@ defmodule Pleroma.ReverseProxyTest do
|
||||
Application.put_env(:tesla, :adapter, Tesla.Adapter.Gun)
|
||||
|
||||
api = Pleroma.Config.get([Pleroma.Gun.API])
|
||||
Pleroma.Config.put([Pleroma.Gun.API], :gun)
|
||||
Pleroma.Config.put([Pleroma.Gun.API], Pleroma.Gun.API.Gun)
|
||||
{:ok, _} = Pleroma.Gun.Connections.start_link(Pleroma.Gun.Connections)
|
||||
|
||||
conn = ReverseProxy.call(conn, "https://httpbin.org/stream-bytes/10")
|
||||
@ -369,7 +369,7 @@ defmodule Pleroma.ReverseProxyTest do
|
||||
Application.put_env(:tesla, :adapter, Tesla.Adapter.Gun)
|
||||
|
||||
api = Pleroma.Config.get([Pleroma.Gun.API])
|
||||
Pleroma.Config.put([Pleroma.Gun.API], :gun)
|
||||
Pleroma.Config.put([Pleroma.Gun.API], Pleroma.Gun.API.Gun)
|
||||
{:ok, _} = Pleroma.Gun.Connections.start_link(Pleroma.Gun.Connections)
|
||||
|
||||
conn = ReverseProxy.call(conn, "https://httpbin.org/redirect/5")
|
||||
|
Loading…
Reference in New Issue
Block a user