Add workaround for nextcloud not generating URLs with HTTPS protocol when behind a reverse proxy

This commit is contained in:
Francesco Antognazza 2023-02-08 11:30:37 +01:00
parent b4c55cffc9
commit 0957ad5f1c

View File

@ -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