-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Easy way to configure 'trusted_domains' in config.php #41
Comments
this worked for me. Under nextcloud:
configs:
proxies.config.php: |-
<?php
$CONFIG = array (
'trusted_proxies' => ['10.43.0.0/16']
); |
@js02sixty |
When i try to add the trusted proxies as you mentioned i get the following error:
|
+1, everytime I install I get a message telling me to edit |
worked nextcloud version 23.x helm charts,add setting values.yaml,Inspired by @js02sixty nextcloud:
configs:
domains.config.php: |-
<?php
$CONFIG = array (
'trusted_domains' =>
array (
0 => '192.168.2.*',
1 => 'nextcloud.kube.home',
)
); |
Should this file not be a config that would get templated anytime This would likely resolve some issues that the probes are hitting as well. |
I think that's what this is for in our helm/charts/nextcloud/templates/_helpers.tpl Lines 153 to 154 in da174ec
According to the nextcloud/docker README that env variable is used for running an if [ -n "${NEXTCLOUD_TRUSTED_DOMAINS+x}" ]; then
echo "Setting trusted domains…"
NC_TRUSTED_DOMAIN_IDX=1
for DOMAIN in $NEXTCLOUD_TRUSTED_DOMAINS ; do
DOMAIN=$(echo "$DOMAIN" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
run_as "php /var/www/html/occ config:system:set trusted_domains $NC_TRUSTED_DOMAIN_IDX --value=$DOMAIN"
NC_TRUSTED_DOMAIN_IDX=$((NC_TRUSTED_DOMAIN_IDX+1))
done
fi It looks like the most recent change to that block was this: https://github.com/nextcloud/docker/pull/1868/files If it's still not working though, I think testing at a docker level would be the next step. If anyone has time, could you please test if this works in the docker container by specifying the I don't use trusted_domains, but instead use trusted_proxies (in part due to my using nginx, I believe) which we currently don't handle in the helm chart, and I may submit a PR for that, as it does appear to be handled by the docker container according to this, so I will do my due diligence of testing that part, as it is part of my normal lab setup and easier to tackle sooner rather than later. |
Hope that this does not break topic but can someone tell me which one has precedence the docker environment vars or the persisted config in the nextcloud container? Looking here it seems the env var recreates the redis config on start. but here it seems the env var is only used once installation time. I would like to migrate my configuration to using envvars only but don't know where to start. |
The env vars are used on startup once, I believe, but the config file is processed more often, I believe. You can also set any stragglers with the |
I am using NextCloud with PicoCMS to host a couple of public-facing sites operating on their own domain.
I can create appropriate ingresses for them but the requests still get blocked to the sites because the domains are not in the 'trusted_domains' variable in config/config.php.
If I add them manually it works but this is very cumbersome because it has to be done in the container.
Is there a way to configure the list of trusted hosts via the Helm chart?
If not, what is the least painful way to extend the list now and again.
The text was updated successfully, but these errors were encountered: