Skip to content

Commit

Permalink
Fix incorrect regular expression to permit hyphenated-subdomains
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kadamwhite committed Aug 20, 2020
1 parent 0a7125c commit 6c3af7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 6c3af7f

Please sign in to comment.