Fix ShellCheck errors: remove local outside functions, fix openssl redirections, unquote loop var
Lint Scripts / shellcheck (push) Failing after 14m30s
Lint Scripts / powershell-lint (push) Failing after 15m29s

This commit is contained in:
2026-05-25 05:28:31 +02:00
parent 62139b3377
commit 515c9843dd
4 changed files with 12 additions and 12 deletions
+3 -3
View File
@@ -279,8 +279,8 @@ geoip2 /usr/share/GeoIP/GeoLite2-City.mmdb {
fi
# Collect server_name values from nginx configs to build same-site referer map
local REFERER_ENTRIES=""
local _jsc_domain_seen=()
REFERER_ENTRIES=""
_jsc_domain_seen=()
for _conf in /etc/nginx/conf.d/*.conf /etc/nginx/sites-enabled/*; do
[[ -f "$_conf" ]] || continue
while read -r _sn; do
@@ -289,7 +289,7 @@ fi
_d="${_d%;}"
[[ " ${_jsc_domain_seen[*]:-} " == *" $_d "* ]] && continue
_jsc_domain_seen+=("$_d")
local _d_escaped="${_d//./\\.}"
_d_escaped="${_d//./\\.}"
REFERER_ENTRIES+=" ~^1:https?://${_d_escaped} 1;\n"
done
done < <(grep -oP '^\s*server_name\s+\K[^;]+;?' "$_conf" 2>/dev/null)