-
Notifications
You must be signed in to change notification settings - Fork 300
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Description of the change
When Nginx respects the headers X-Forwarded-Proto and X-Forwarded-Port, most setups would work out of the box because the headers are already present (like Traefik does).
The original issue came from failing auto-discovery, because Nginx redirects to insecure http scheme adresses MacOSX' accountsd won't follow.
The solution provided by the documentation https://github.com/nextcloud/helm/tree/main/charts/nextcloud#service-discovery-with-nginx-and-ingress is only for Nginx ingress and could be skipped with this change.
It's possible to improve the nginx configuration by respecting the X-Forwarded-Proto header:
map $http_x_forwarded_proto $real_scheme {
default https;
https https;
}
location = /.well-known/carddav { return 301 $real_scheme://$host/remote.php/dav/; }
location = /.well-known/caldav { return 301 $real_scheme://$host/remote.php/dav/; }
Benefits
- All URLs are directly redirected to the correct public scheme (from Ingress).
- Easier out-of-the-box setup
Possible drawbacks
- The configuration needs to add
$real_schemefor every redirect. - Maybe we need to integrate
X-Forwarded-Portas well for instances running different from 443
Additional information
(none)
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request