docker
docker copied to clipboard
trusted_domains not working when overwrite host is set?
When i set this in my docker-compose.yml
OVERWRITEHOST: cloud-test.example.com
NEXTCLOUD_TRUSTED_DOMAINS: cloud-test.internal.example.com
and change later in the config.php
the trusted_domains. They have no affect...
When i do not set the OVERWRITEHOST in the docker-compose, I can later adjust the trusted_domains.
Is this a bug?
Edit: My nextcloud container is behind traefik.
The same happened to me
What I ended up doing was not setting the OWERWRITEHOST
config, but instead set the Host HTTP Header properly
In nginx it was like this:
location / {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://localhost:8000;
}
I still had to leave OVERWRITEPROTOCOL: https
though
Now the trusted domains check works and it generates valid URLs