From 4983eaa9831d8d95c1c7e3bd857abc31156a7a57 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 16 May 2023 23:40:52 +0300 Subject: [PATCH] baikal: add redirect middleware to make it work with iOS (#58) * baikal: add redirect middleware to make it work with iOS * baikal: bump version --- charts/baikal/Chart.yaml | 2 +- charts/baikal/templates/middleware.yaml | 14 ++++++++++++++ charts/baikal/values.yaml | 3 +++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 charts/baikal/templates/middleware.yaml diff --git a/charts/baikal/Chart.yaml b/charts/baikal/Chart.yaml index aef2295..070395c 100644 --- a/charts/baikal/Chart.yaml +++ b/charts/baikal/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: baikal description: The open source CardDAV, CalDAV and WebDAV server -version: 1.0.0 +version: 1.1.0 appVersion: 0.9.3-nginx kubeVersion: ">=1.16.0-0" type: application diff --git a/charts/baikal/templates/middleware.yaml b/charts/baikal/templates/middleware.yaml new file mode 100644 index 0000000..a7eab75 --- /dev/null +++ b/charts/baikal/templates/middleware.yaml @@ -0,0 +1,14 @@ +# For iOS clients we need to redirect /.well-known/carddav and +# /.well-known/caldav to just /dav.php +# See https://homan.ee/en/iphone-calendar-synchronization-ios-settings-for-baikal-caldav +apiVersion: traefik.containo.us/v1alpha1 +kind: Middleware +metadata: + name: redirect-card-cal-dav + labels: + {{- include "librepod.labels" . | nindent 4 }} +spec: + redirectRegex: + regex: https://baikal.libre.pod/.well-known/(card|cal)dav + replacement: https://baikal.libre.pod/dav.php/ + permanent: true diff --git a/charts/baikal/values.yaml b/charts/baikal/values.yaml index 9ad89b9..dfc82c3 100644 --- a/charts/baikal/values.yaml +++ b/charts/baikal/values.yaml @@ -17,6 +17,9 @@ ingress: enabled: true hosts: - host: baikal.libre.pod + # See templates/middleware.yaml for details. + middlewares: + - redirect-card-cal-dav dashboard: expose: true