feat: allow users to specify wildcard domains

Closes #3075
This commit is contained in:
Jose Diaz-Gonzalez
2019-05-20 18:29:31 -07:00
parent 0087296bd3
commit b921aed073
2 changed files with 6 additions and 1 deletions

View File

@@ -312,7 +312,7 @@ is_global_vhost_enabled() {
is_valid_hostname() {
declare desc="return 0 if argument is a valid hostname; else return 1"
local hostname_string="${1,,}"
local hostname_regex='^([a-z0-9\*-]+\.)*[a-z0-9\*-]+$'
local hostname_regex='^([a-z0-9\.\*-]+\.)*[a-z0-9\*-]+$'
if [[ $hostname_string =~ $hostname_regex ]]; then
return 0
else

View File

@@ -45,6 +45,11 @@ teardown() {
echo "status: $status"
assert_success
run /bin/bash -c "dokku domains:add $TEST_APP .dokku.me"
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "dokku domains $TEST_APP 2>/dev/null"
echo "output: $output"
echo "status: $status"