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