nextcloud / docker

⛴ Docker image of Nextcloud
https://hub.docker.com/_/nextcloud/
GNU Affero General Public License v3.0
6.1k stars 1.83k forks source link

Disable absolute redirect #2314

Open TommyTran732 opened 1 month ago

TommyTran732 commented 1 month ago

Absolute redirect should be disabled. Currently, it only works by chance because the web container is listening on port 80.

If you try to change the port to something like 8080, the 301 redirect for things like caldav and carddav will be broken.

J0WI commented 1 month ago

The example also uses port 80 and we take the configuration from https://github.com/nextcloud/documentation/blob/master/admin_manual/installation/nginx-root.conf.sample It's expected that you need to adopt these examples for your use case.

TommyTran732 commented 1 month ago

It doesn't matter though, when you are using an app behind a reverse proxy (as is the case of nginx in this stack) it is expected that relative redirect is used instead of absolute redirect. Absolute redirect should be disabled for correctness.

I wasted quite a lot of time debugging weird error because of this and I see no reason to not do it to save other people the trouble.