docker icon indicating copy to clipboard operation
docker copied to clipboard

trusted_domains not working when overwrite host is set?

Open BornToBeRoot opened this issue 3 years ago • 2 comments

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.

BornToBeRoot avatar Jan 03 '22 02:01 BornToBeRoot

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

MatiasConTilde avatar Jan 13 '22 23:01 MatiasConTilde