[release] v0.7.5

This commit is contained in:
Yann Stepienik 2023-06-18 10:35:07 +01:00
parent 245305e3a6
commit ee87be7994
2 changed files with 4 additions and 11 deletions

View file

@ -1,6 +1,6 @@
{
"name": "cosmos-server",
"version": "0.7.4",
"version": "0.7.5",
"description": "",
"main": "test-server.js",
"bugs": {

View file

@ -307,15 +307,6 @@ func GetAllHostnames(applyWildCard bool, removePorts bool) []string {
mainHostname,
}
if applyWildCard && MainConfig.HTTPConfig.UseWildcardCertificate {
mainHostnameWild := "*." + mainHostname
hostnames = []string{
mainHostname,
mainHostnameWild,
}
Log("Using wildcard certificate for " + mainHostname + " and all subdomains.")
}
proxies := GetMainConfig().HTTPConfig.ProxyConfig.Routes
for _, proxy := range proxies {
if proxy.UseHost && proxy.Host != "" && strings.Contains(proxy.Host, ".") && !strings.Contains(proxy.Host, ",") && !strings.Contains(proxy.Host, " ") {
@ -339,14 +330,16 @@ func GetAllHostnames(applyWildCard bool, removePorts bool) []string {
if applyWildCard && MainConfig.HTTPConfig.UseWildcardCertificate {
filteredHostnames := []string{
"*." + mainHostname,
mainHostname,
}
for _, hostname := range uniqueHostnames {
if hostname != mainHostname && !strings.HasSuffix(hostname, mainHostname[1:]) {
if hostname != mainHostname && !strings.HasSuffix(hostname, "."+mainHostname) {
filteredHostnames = append(filteredHostnames, hostname)
}
}
uniqueHostnames = filteredHostnames
}