[DOCS] Make HAProxy regex case insensitive (#1478)

pull/1484/head
Timo 2020-11-24 02:35:38 +01:00 committed by GitHub
parent f811b40957
commit 495e57b46c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -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. 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: 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 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: backend upon successful authentication, for example:
@ -86,7 +86,7 @@ frontend fe_http
bind *:443 ssl crt /usr/local/etc/haproxy/haproxy.pem bind *:443 ssl crt /usr/local/etc/haproxy/haproxy.pem
# Host ACLs # 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-authelia hdr(host) -i auth.example.com
acl host-nextcloud hdr(host) -i nextcloud.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 bind *:443 ssl crt /usr/local/etc/haproxy/haproxy.pem
# Host ACLs # 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-authelia hdr(host) -i auth.example.com
acl host-nextcloud hdr(host) -i nextcloud.example.com acl host-nextcloud hdr(host) -i nextcloud.example.com

View File

@ -23,7 +23,7 @@ frontend fe_http
acl api-path path_beg -i /api acl api-path path_beg -i /api
acl headers-path path -i -m end /headers acl headers-path path -i -m end /headers
acl host-authelia-portal hdr(host) -i login.example.com:8080 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(https) if { ssl_fc }
http-request set-var(req.scheme) str(http) if !{ ssl_fc } http-request set-var(req.scheme) str(http) if !{ ssl_fc }