Merge pull request #3540 from dokku/3529-better-default-vhost

Do not append the global domain for matching subdomains
This commit is contained in:
Jose Diaz-Gonzalez authored and GitHub committed 2019-05-19 23:00:17 -07:00
commit 2315a127ea
4 files changed
+24 -16

No files matched your search

+1 -1
View File
@@ -257,7 +257,7 @@ get_default_vhosts() {
local SUBDOMAIN=${APP/%\.${VHOST}/}
local hostname=$(: | plugn trigger nginx-hostname "$APP" "$SUBDOMAIN" "$VHOST")
if [[ -z $hostname ]]; then
if [[ "$APP" == *.* ]] && [[ "$SUBDOMAIN" == "$APP" ]]; then
if [[ "$APP" == *.* ]]; then
local hostname="${APP/\//-}"
else
local hostname="${APP/\//-}.$VHOST"