mirror of
https://github.com/iv-org/invidious.git
synced 2025-06-30 10:38:29 +00:00
fix formatting
This commit is contained in:
parent
a47336365f
commit
65fee59234
@ -213,7 +213,7 @@ module Invidious::Routes::Embed
|
|||||||
uri =
|
uri =
|
||||||
"#{companion.public_url.scheme}://#{companion.public_url.host}#{companion.public_url.port ? ":#{companion.public_url.port}" : ""}"
|
"#{companion.public_url.scheme}://#{companion.public_url.host}#{companion.public_url.port ? ":#{companion.public_url.port}" : ""}"
|
||||||
end.join(" ")
|
end.join(" ")
|
||||||
|
|
||||||
if !invidious_companion_urls.empty?
|
if !invidious_companion_urls.empty?
|
||||||
env.response.headers["Content-Security-Policy"] =
|
env.response.headers["Content-Security-Policy"] =
|
||||||
env.response.headers["Content-Security-Policy"]
|
env.response.headers["Content-Security-Policy"]
|
||||||
|
@ -198,7 +198,7 @@ module Invidious::Routes::Watch
|
|||||||
uri =
|
uri =
|
||||||
"#{companion.public_url.scheme}://#{companion.public_url.host}#{companion.public_url.port ? ":#{companion.public_url.port}" : ""}"
|
"#{companion.public_url.scheme}://#{companion.public_url.host}#{companion.public_url.port ? ":#{companion.public_url.port}" : ""}"
|
||||||
end.join(" ")
|
end.join(" ")
|
||||||
|
|
||||||
if !invidious_companion_urls.empty?
|
if !invidious_companion_urls.empty?
|
||||||
env.response.headers["Content-Security-Policy"] =
|
env.response.headers["Content-Security-Policy"] =
|
||||||
env.response.headers["Content-Security-Policy"]
|
env.response.headers["Content-Security-Policy"]
|
||||||
|
@ -47,7 +47,7 @@ struct YoutubeConnectionPool
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Packages a `HTTP::Client` to an Invidious companion instance alongside the configuration for that instance.
|
# Packages a `HTTP::Client` to an Invidious companion instance alongside the configuration for that instance.
|
||||||
#
|
#
|
||||||
# This is used as the resource for the `CompanionPool` as to allow the ability to
|
# This is used as the resource for the `CompanionPool` as to allow the ability to
|
||||||
# proxy the requests to Invidious companion from Invidious directly.
|
# proxy the requests to Invidious companion from Invidious directly.
|
||||||
# Instead of setting up routes in a reverse proxy.
|
# Instead of setting up routes in a reverse proxy.
|
||||||
|
@ -700,7 +700,7 @@ module YoutubeAPI
|
|||||||
COMPANION_POOL.client do |wrapper|
|
COMPANION_POOL.client do |wrapper|
|
||||||
companion_base_url = wrapper.companion.private_url.path
|
companion_base_url = wrapper.companion.private_url.path
|
||||||
|
|
||||||
wrapper.client.post("#{companion_base_url}#{endpoint}", headers: headers, body: data.to_json) do | response |
|
wrapper.client.post("#{companion_base_url}#{endpoint}", headers: headers, body: data.to_json) do |response|
|
||||||
response_body = JSON.parse(response.body_io).as_h
|
response_body = JSON.parse(response.body_io).as_h
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user