mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2023-06-08.git
synced 2024-08-15 00:53:38 +00:00
Add config option for geo-bypass
This commit is contained in:
parent
236358d3ad
commit
f83e9e6eb9
3 changed files with 5 additions and 1 deletions
|
@ -8,4 +8,5 @@ db:
|
||||||
port: 5432
|
port: 5432
|
||||||
dbname: invidious
|
dbname: invidious
|
||||||
full_refresh: false
|
full_refresh: false
|
||||||
https_only: false
|
https_only: false
|
||||||
|
geo_bypass: true
|
||||||
|
|
|
@ -106,6 +106,7 @@ spawn do
|
||||||
end
|
end
|
||||||
|
|
||||||
proxies = {} of String => Array({ip: String, port: Int32})
|
proxies = {} of String => Array({ip: String, port: Int32})
|
||||||
|
if CONFIG.geo_bypass
|
||||||
spawn do
|
spawn do
|
||||||
find_working_proxies(BYPASS_REGIONS) do |region, list|
|
find_working_proxies(BYPASS_REGIONS) do |region, list|
|
||||||
if !list.empty?
|
if !list.empty?
|
||||||
|
@ -113,6 +114,7 @@ spawn do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
before_all do |env|
|
before_all do |env|
|
||||||
env.response.headers["X-XSS-Protection"] = "1; mode=block;"
|
env.response.headers["X-XSS-Protection"] = "1; mode=block;"
|
||||||
|
|
|
@ -14,6 +14,7 @@ class Config
|
||||||
https_only: Bool?,
|
https_only: Bool?,
|
||||||
hmac_key: String?,
|
hmac_key: String?,
|
||||||
full_refresh: Bool,
|
full_refresh: Bool,
|
||||||
|
geo_bypass: Bool,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue