From 495e57b46c7cdd26b741fa72b6a40e2cb8cbf3cc Mon Sep 17 00:00:00 2001 From: Timo Date: Tue, 24 Nov 2020 02:35:38 +0100 Subject: [PATCH] [DOCS] Make HAProxy regex case insensitive (#1478) --- docs/deployment/supported-proxies/haproxy.md | 6 +++--- internal/suites/example/compose/haproxy/haproxy.cfg | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/deployment/supported-proxies/haproxy.md b/docs/deployment/supported-proxies/haproxy.md index 82947f80..51d294be 100644 --- a/docs/deployment/supported-proxies/haproxy.md +++ b/docs/deployment/supported-proxies/haproxy.md @@ -34,7 +34,7 @@ With this configuration you can protect your virtual hosts with Authelia, by fol 1. Add host(s) to the `protected-frontends` ACL to support protection with Authelia. You can separate each subdomain with a `|` in the regex, for example: ``` - acl protected-frontends hdr(host) -m reg -i ^(jenkins|nextcloud|phpmyadmin)\.example\.com + acl protected-frontends hdr(host) -m reg -i ^(?i)(jenkins|nextcloud|phpmyadmin)\.example\.com ``` 2. Add host ACL(s) in the form of `host-service`, this will be utilised to route to the correct backend upon successful authentication, for example: @@ -86,7 +86,7 @@ frontend fe_http bind *:443 ssl crt /usr/local/etc/haproxy/haproxy.pem # Host ACLs - acl protected-frontends hdr(host) -m reg -i ^(nextcloud)\.example\.com + acl protected-frontends hdr(host) -m reg -i ^(?i)(nextcloud)\.example\.com acl host-authelia hdr(host) -i auth.example.com acl host-nextcloud hdr(host) -i nextcloud.example.com @@ -146,7 +146,7 @@ frontend fe_http bind *:443 ssl crt /usr/local/etc/haproxy/haproxy.pem # Host ACLs - acl protected-frontends hdr(host) -m reg -i ^(nextcloud)\.example\.com + acl protected-frontends hdr(host) -m reg -i ^(?i)(nextcloud)\.example\.com acl host-authelia hdr(host) -i auth.example.com acl host-nextcloud hdr(host) -i nextcloud.example.com diff --git a/internal/suites/example/compose/haproxy/haproxy.cfg b/internal/suites/example/compose/haproxy/haproxy.cfg index 79309632..edc9ec07 100644 --- a/internal/suites/example/compose/haproxy/haproxy.cfg +++ b/internal/suites/example/compose/haproxy/haproxy.cfg @@ -23,7 +23,7 @@ frontend fe_http acl api-path path_beg -i /api acl headers-path path -i -m end /headers acl host-authelia-portal hdr(host) -i login.example.com:8080 - acl protected-frontends hdr(host) -m reg -i ^(admin|home|public|secure|singlefactor)\.example\.com + acl protected-frontends hdr(host) -m reg -i ^(?i)(admin|home|public|secure|singlefactor)\.example\.com http-request set-var(req.scheme) str(https) if { ssl_fc } http-request set-var(req.scheme) str(http) if !{ ssl_fc }