fix for davical /server url path
This commit is contained in:
@@ -27,6 +27,14 @@ spec:
|
|||||||
if [ ! -f /mnt/config-pvc/davical.php ]; then
|
if [ ! -f /mnt/config-pvc/davical.php ]; then
|
||||||
cp -r /config/. /mnt/config-pvc/
|
cp -r /config/. /mnt/config-pvc/
|
||||||
fi
|
fi
|
||||||
|
# Apache's SCRIPT_NAME (and DAViCal's base_url derived from it)
|
||||||
|
# only reflects the /server prefix if Apache itself resolves
|
||||||
|
# that prefix - Traefik forwards the path unstripped. Add an
|
||||||
|
# Alias so /server/* maps to the app root; idempotent so it
|
||||||
|
# self-heals if apache.conf predates this fix.
|
||||||
|
if ! grep -q '^\s*Alias /server ' /mnt/config-pvc/apache.conf; then
|
||||||
|
sed -i '/^\s*DocumentRoot \/usr\/share\/davical\/htdocs/a\ Alias /server /usr/share/davical/htdocs' /mnt/config-pvc/apache.conf
|
||||||
|
fi
|
||||||
containers:
|
containers:
|
||||||
app:
|
app:
|
||||||
image:
|
image:
|
||||||
@@ -78,8 +86,10 @@ spec:
|
|||||||
# requests/owns the Certificate for c.aggtaa.com -> radicale-tls.
|
# requests/owns the Certificate for c.aggtaa.com -> radicale-tls.
|
||||||
# A second Ingress with the annotation would create a competing
|
# A second Ingress with the annotation would create a competing
|
||||||
# Certificate for the same host/secret.
|
# Certificate for the same host/secret.
|
||||||
annotations:
|
#
|
||||||
traefik.ingress.kubernetes.io/router.middlewares: pim-davical-stripprefix@kubernetescrd
|
# No stripPrefix middleware either: Apache needs to see the /server
|
||||||
|
# prefix itself (via the Alias added in the seed-config initContainer)
|
||||||
|
# so that DAViCal's self-referential links come out correct.
|
||||||
hosts:
|
hosts:
|
||||||
- host: c.aggtaa.com
|
- host: c.aggtaa.com
|
||||||
paths:
|
paths:
|
||||||
|
|||||||
@@ -3,6 +3,5 @@ kind: Kustomization
|
|||||||
resources:
|
resources:
|
||||||
- helmrepository.yaml
|
- helmrepository.yaml
|
||||||
- secret.enc.yaml
|
- secret.enc.yaml
|
||||||
- middleware.yaml
|
|
||||||
- helmrelease-postgres.yaml
|
- helmrelease-postgres.yaml
|
||||||
- helmrelease-davical.yaml
|
- helmrelease-davical.yaml
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
apiVersion: traefik.io/v1alpha1
|
|
||||||
kind: Middleware
|
|
||||||
metadata:
|
|
||||||
name: davical-stripprefix
|
|
||||||
namespace: pim
|
|
||||||
spec:
|
|
||||||
stripPrefix:
|
|
||||||
prefixes:
|
|
||||||
- /server
|
|
||||||
Reference in New Issue
Block a user