mirror of
https://github.com/iv-org/invidious.git
synced 2025-07-14 09:28:32 +00:00
fix: don't use http proxy when sending requests to companion
This commit is contained in:
parent
5f8ad34de4
commit
7865f08d5f
@ -59,14 +59,12 @@ struct CompanionConnectionPool
|
|||||||
|
|
||||||
@pool = DB::Pool(HTTP::Client).new(options) do
|
@pool = DB::Pool(HTTP::Client).new(options) do
|
||||||
companion = CONFIG.invidious_companion.sample
|
companion = CONFIG.invidious_companion.sample
|
||||||
next make_client(companion.private_url, force_resolve: true)
|
next make_client(companion.private_url, use_http_proxy: false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def client(&)
|
def client(&)
|
||||||
conn = pool.checkout
|
conn = pool.checkout
|
||||||
# Proxy needs to be reinstated every time we get a client from the pool
|
|
||||||
conn.proxy = make_configured_http_proxy_client() if CONFIG.http_proxy
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
response = yield conn
|
response = yield conn
|
||||||
@ -74,7 +72,7 @@ struct CompanionConnectionPool
|
|||||||
conn.close
|
conn.close
|
||||||
|
|
||||||
companion = CONFIG.invidious_companion.sample
|
companion = CONFIG.invidious_companion.sample
|
||||||
conn = make_client(companion.private_url, force_resolve: true)
|
conn = make_client(companion.private_url, use_http_proxy: false)
|
||||||
|
|
||||||
response = yield conn
|
response = yield conn
|
||||||
ensure
|
ensure
|
||||||
|
Loading…
Reference in New Issue
Block a user