Remove duplicate SSL hostnames
Ref dokku/dokku-letsencrypt#76 Certificates provided by Let's Encrypt can have the domain provided in the Subject Name field listed again in the Subject Alt Name fields, leading to the same domain getting listed twice by get_ssl_hostnames() that in turn leads to a duplicate server_name field in the nginx configuration. This patch adds a sort -u to ensure that every SSL hostname will only be listed once.
This commit is contained in:
1 parent
3200c169f4
commit
030405b93d
1 file changed
+1
-1
@@ -26,6 +26,6 @@ get_ssl_hostnames() {
|
|||||||
else
|
else
|
||||||
local SSL_HOSTNAMES=$SSL_HOSTNAME
|
local SSL_HOSTNAMES=$SSL_HOSTNAME
|
||||||
fi
|
fi
|
||||||
echo -e "$SSL_HOSTNAMES"
|
echo -e "$SSL_HOSTNAMES" | sort -u
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user