http:
  middlewares:
    hsts:
      headers:
        stsincludesubdomains: true
        stspreload: true
        stsseconds: 31536000 # 1 an
    nextcloud-redirectregex1:
      redirectregex:
        permanent: true
        regex: https?://([^/]*)/.well-known/(card|cal)dav
        replacement: https://${1}/remote.php/dav/
    nextcloud-redirectregex2:
      redirectregex:
        permanent: true
        regex: https?://([^/]*)(/.well-known[^#]*)
        replacement: https://${1}/index.php${2}
