@@ -14,13 +14,13 @@ export BINDIR=/usr/local/bin/ncp
1414export NCDIR=/var/www/nextcloud
1515export ncc=/usr/local/bin/ncc
1616
17- unset TRUSTED_DOMAINS
18- declare -A TRUSTED_DOMAINS
19- export TRUSTED_DOMAINS=(
20- [ip]=1 [dnsmasq]=2 [nc_domain]=3 [nextcloudpi-local]=5 [docker_overwrite]=6
21- [nextcloudpi]=7 [nextcloudpi-lan]=8 [public_ip]=11 [letsencrypt_1]=12
22- [letsencrypt_2]=13 [hostname]=14 [trusted_domain_1]=20 [trusted_domain_2]=21 [trusted_domain_3]=22
23- )
17+ # unset TRUSTED_DOMAINS
18+ # declare -A TRUSTED_DOMAINS
19+ # export TRUSTED_DOMAINS=(
20+ # [ip]=1 [dnsmasq]=2 [nc_domain]=3 [nextcloudpi-local]=5 [docker_overwrite]=6
21+ # [nextcloudpi]=7 [nextcloudpi-lan]=8 [public_ip]=11 [letsencrypt_1]=12
22+ # [letsencrypt_2]=13 [hostname]=14 [trusted_domain_1]=20 [trusted_domain_2]=21 [trusted_domain_3]=22
23+ # )
2424
2525command -v jq & > /dev/null || {
2626 apt-get update
@@ -127,7 +127,7 @@ function set-nc-domain()
127127 proto=" $( ncc config:system:get overwriteprotocol) " || true
128128 [[ " ${proto} " == " " ]] && proto=" https"
129129 local url=" ${proto} ://${domain%*/ } "
130- [[ " $2 " == " --no-trusted-domain" ]] || ncc config:system:set trusted_domains " ${TRUSTED_DOMAINS[nc-domain]} " --value=" ${domain%*/ } "
130+ [[ " $2 " == " --no-trusted-domain" ]] || ncc config:system:set trusted_domains 3 --value=" ${domain%*/ } "
131131 ncc config:system:set overwrite.cli.url --value=" ${url} /"
132132 if is_ncp_activated && is_app_enabled notify_push; then
133133 ncc config:system:set trusted_proxies 11 --value=" 127.0.0.1"
0 commit comments