From 538aeb5538e4cefba35b776c9edbd82b1718686b Mon Sep 17 00:00:00 2001 From: darta Date: Tue, 25 Jan 2022 12:27:32 +0000 Subject: [PATCH] fix(custom): added favicon.ico for project --- docker/haproxy/haproxy-behind.conf | 5 ++++- docker/haproxy/haproxy.conf | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docker/haproxy/haproxy-behind.conf b/docker/haproxy/haproxy-behind.conf index b25d64e..79543d7 100644 --- a/docker/haproxy/haproxy-behind.conf +++ b/docker/haproxy/haproxy-behind.conf @@ -52,6 +52,8 @@ frontend website acl is_root path -i / http-request deny if is_pad is_root + use_backend be_api if { path_end -i favicon.ico } + use_backend be_nextcloud if is_nextcloud use_backend be_moodle if is_moodle use_backend be_jitsi if is_jitsi @@ -64,12 +66,13 @@ frontend website use_backend be_sso if is_sso use_backend be_ipa if is_ipa use_backend be_api if is_api - + http-request redirect code 301 location https://moodle."${DOMAIN}" if { hdr(host) -i "${DOMAIN}" } # default_backend be_sso backend be_api mode http + http-request set-path /img/favicon.ico if { path_end -i favicon.ico } acl existing-x-forwarded-host req.hdr(X-Forwarded-Host) -m found 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 diff --git a/docker/haproxy/haproxy.conf b/docker/haproxy/haproxy.conf index 57ab31b..cd1a2ea 100644 --- a/docker/haproxy/haproxy.conf +++ b/docker/haproxy/haproxy.conf @@ -52,6 +52,8 @@ frontend website acl is_root path -i / http-request deny if is_pad is_root + use_backend be_api if { path_end -i favicon.ico } + 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 @@ -75,6 +77,7 @@ backend letsencrypt backend be_api mode http + http-request set-path /img/favicon.ico if { path_end -i favicon.ico } acl existing-x-forwarded-host req.hdr(X-Forwarded-Host) -m found 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