From 6c3af7f9d95920ae439582ea03e445abc4d01d15 Mon Sep 17 00:00:00 2001 From: K Adam White Date: Thu, 20 Aug 2020 12:48:31 -0400 Subject: [PATCH] Fix incorrect regular expression to permit hyphenated-subdomains The hyphen in .-_ is not treated as a literal hyphen unless it occurs at the end of the [] group. This can be demonstrated in the JS console: 'hyphenated-site'.match( /^[a-z.-_]+$/ ) // null 'hyphenated-site'.match( /^[a-z._-]+$/ ) // [ ...results ] Reordering these characters allows hyphenated-subdomains to be matched. --- docker/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 40584812..542318eb 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -114,7 +114,7 @@ services: - "traefik.port=8080" - "traefik.protocol=https" - "traefik.docker.network=proxy" - - "traefik.frontend.rule=HostRegexp:${COMPOSE_PROJECT_NAME:-default}.altis.dev,{subdomain:[a-z.-_]+}.${COMPOSE_PROJECT_NAME:-default}.altis.dev" + - "traefik.frontend.rule=HostRegexp:${COMPOSE_PROJECT_NAME:-default}.altis.dev,{subdomain:[a-z._-]+}.${COMPOSE_PROJECT_NAME:-default}.altis.dev" xray: image: amazon/aws-xray-daemon:3.0.1 ports: