summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOmar Roth <omarroth@hotmail.com>2018-10-03 10:36:30 -0500
committerOmar Roth <omarroth@hotmail.com>2018-10-03 10:36:30 -0500
commitf83e9e6eb9b5811342510248d5339c86b481b13a (patch)
treec05db738ca25f8b9db692c2fc08658b45842d3c8 /src
parent236358d3ad2c92991a311eb2c60335ce232c9c8b (diff)
downloadinvidious-f83e9e6eb9b5811342510248d5339c86b481b13a.tar.gz
invidious-f83e9e6eb9b5811342510248d5339c86b481b13a.tar.bz2
invidious-f83e9e6eb9b5811342510248d5339c86b481b13a.zip
Add config option for geo-bypass
Diffstat (limited to 'src')
-rw-r--r--src/invidious.cr2
-rw-r--r--src/invidious/helpers/helpers.cr1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/invidious.cr b/src/invidious.cr
index 37a68d20..614b25c0 100644
--- a/src/invidious.cr
+++ b/src/invidious.cr
@@ -106,6 +106,7 @@ spawn do
end
proxies = {} of String => Array({ip: String, port: Int32})
+if CONFIG.geo_bypass
spawn do
find_working_proxies(BYPASS_REGIONS) do |region, list|
if !list.empty?
@@ -113,6 +114,7 @@ spawn do
end
end
end
+end
before_all do |env|
env.response.headers["X-XSS-Protection"] = "1; mode=block;"
diff --git a/src/invidious/helpers/helpers.cr b/src/invidious/helpers/helpers.cr
index ab33c3af..ac48534a 100644
--- a/src/invidious/helpers/helpers.cr
+++ b/src/invidious/helpers/helpers.cr
@@ -14,6 +14,7 @@ class Config
https_only: Bool?,
hmac_key: String?,
full_refresh: Bool,
+ geo_bypass: Bool,
})
end