From: Michael Tremer Date: Thu, 9 Jul 2026 10:07:57 +0000 (+0200) Subject: knot-resolver: Don't overwrite zone apexes X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=451afb04fad2964dbea01ce57ff385ff3893d4e9;p=ipfire-2.x.git knot-resolver: Don't overwrite zone apexes For SafeSearch we want to ensure that there are no leaks, but it is for obvious reasons nonsensical to overwrite the apex. Signed-off-by: Michael Tremer --- diff --git a/config/knot-resolver/config.lua b/config/knot-resolver/config.lua index c382434c2..c3fb6ef25 100644 --- a/config/knot-resolver/config.lua +++ b/config/knot-resolver/config.lua @@ -329,24 +329,22 @@ function config.load_safesearch(settings) -- Enable Googe Safe Search for i, tld in ipairs(GOOGLE_TLDS) do - local name = string.format("google.%s", tld) - - add({ name, "www." .. name}, "forcesafesearch.google.com") + add({ string.format("www.google.%s", tld) }, "forcesafesearch.google.com") end -- Enable Bing Strict Search - add({ "bing.com", "www.bing.com" }, "strict.bing.com") + add({ "www.bing.com" }, "strict.bing.com") -- Enable DuckDuckGo Safe Search - add({ "duckduckgo.com", "www.duckduckgo.com" }, "safe.duckduckgo.com") + add({ "www.duckduckgo.com" }, "safe.duckduckgo.com") -- Enable Yandex Family Search - add({ "yandex.com", "www.yandex.com" }, "familysearch.yandex.com") - add({ "yandex.ru", "www.yandex.ru" }, "familysearch.yandex.ru") + add({ "www.yandex.com" }, "familysearch.yandex.com") + add({ "www.yandex.ru" }, "familysearch.yandex.ru") -- Enable YouTube Safe Search if settings["ENABLE_SAFE_SEARCH_YOUTUBE"] == "on" then - add({ "youtube.com", "www.youtube.com" }, "restrictmoderate.youtube.com") + add({ "www.youtube.com" }, "restrictmoderate.youtube.com") end -- Create a new zone