From 0957ad5f1c221971c61f76542b36b7b10b71f23d Mon Sep 17 00:00:00 2001 From: Francesco Antognazza Date: Wed, 8 Feb 2023 11:30:37 +0100 Subject: [PATCH] Add workaround for nextcloud not generating URLs with HTTPS protocol when behind a reverse proxy --- containers/nextcloud/tasks.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/containers/nextcloud/tasks.yml b/containers/nextcloud/tasks.yml index 28e6107..5321803 100644 --- a/containers/nextcloud/tasks.yml +++ b/containers/nextcloud/tasks.yml @@ -151,8 +151,8 @@ traefik.http.routers.nextcloud.service: "nextcloud" traefik.http.routers.nextcloud.middlewares: "nextcloud-prefixstrip,nextcloud-redirectregex,nextcloud-headers,http-compress@file" traefik.http.middlewares.nextcloud-redirectregex.redirectRegex.permanent: "true" - traefik.http.middlewares.nextcloud-redirectregex.redirectRegex.regex: "https://(.*)/cloud/.well-known/(card|cal)dav" - traefik.http.middlewares.nextcloud-redirectregex.redirectRegex.replacement: "https://${1}/cloud/remote.php/dav/" + traefik.http.middlewares.nextcloud-redirectregex.redirectRegex.regex: "https://(.*)/.well-known/(card|cal)dav" + traefik.http.middlewares.nextcloud-redirectregex.redirectRegex.replacement: "https://${1}/remote.php/dav/" traefik.http.middlewares.nextcloud-headers.headers.stsSeconds: "31536000" traefik.http.middlewares.nextcloud-headers.headers.stsIncludeSubdomains: "true" traefik.http.middlewares.nextcloud-prefixstrip.stripprefix.prefixes: "/cloud" @@ -176,6 +176,8 @@ MAIL_DOMAIN: "{{ vault_smtp_domain }}" TRUSTED_PROXIES: "traefik" OVERWRITEWEBROOT: "/cloud" + OVERWRITECLIURL: "https://{{ vault_domain }}/cloud" + OVERWRITEPROTOCOL: "https" generate_systemd: path: /home/containers/.config/systemd/user/ restart_policy: on-failure