From 3bd1c3ebdca64285121940ba39fffa780979407f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sim=C3=B3=20Albert=20i=20Beltran?= Date: Thu, 20 Jan 2022 15:09:53 +0100 Subject: [PATCH] Nextcloud use api avatars --- docker/haproxy/haproxy.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker/haproxy/haproxy.conf b/docker/haproxy/haproxy.conf index 17bba98..93e3e23 100644 --- a/docker/haproxy/haproxy.conf +++ b/docker/haproxy/haproxy.conf @@ -50,6 +50,7 @@ frontend website acl is_admin hdr_beg(host) admin. use_backend letsencrypt if { path_beg /.well-known/acme-challenge/ } + use_backend be_api if is_nextcloud { path_beg /avatar/ } use_backend be_nextcloud if is_nextcloud use_backend be_moodle if is_moodle use_backend be_jitsi if is_jitsi @@ -75,6 +76,8 @@ backend be_api acl existing-x-forwarded-proto req.hdr(X-Forwarded-Proto) -m found http-request add-header X-Forwarded-Host %[req.hdr(Host)] unless existing-x-forwarded-host http-request add-header X-Forwarded-Proto https unless existing-x-forwarded-proto + # Nextcloud use /avatar/username/32 /avatar/username/64 and /avatar/username/128 + http-request set-path %[path,regsub(\"^(/avatar/[^/]+).*\",\"\1\")] server api isard-sso-api:80 check port 80 inter 5s rise 2 fall 10 resolvers mydns init-addr none backend be_ipa