[release] v0.7.5
This commit is contained in:
parent
245305e3a6
commit
ee87be7994
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "cosmos-server",
|
"name": "cosmos-server",
|
||||||
"version": "0.7.4",
|
"version": "0.7.5",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "test-server.js",
|
"main": "test-server.js",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
|
|
|
@ -307,15 +307,6 @@ func GetAllHostnames(applyWildCard bool, removePorts bool) []string {
|
||||||
mainHostname,
|
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
|
proxies := GetMainConfig().HTTPConfig.ProxyConfig.Routes
|
||||||
for _, proxy := range proxies {
|
for _, proxy := range proxies {
|
||||||
if proxy.UseHost && proxy.Host != "" && strings.Contains(proxy.Host, ".") && !strings.Contains(proxy.Host, ",") && !strings.Contains(proxy.Host, " ") {
|
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 {
|
if applyWildCard && MainConfig.HTTPConfig.UseWildcardCertificate {
|
||||||
filteredHostnames := []string{
|
filteredHostnames := []string{
|
||||||
|
"*." + mainHostname,
|
||||||
mainHostname,
|
mainHostname,
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, hostname := range uniqueHostnames {
|
for _, hostname := range uniqueHostnames {
|
||||||
if hostname != mainHostname && !strings.HasSuffix(hostname, mainHostname[1:]) {
|
if hostname != mainHostname && !strings.HasSuffix(hostname, "."+mainHostname) {
|
||||||
filteredHostnames = append(filteredHostnames, hostname)
|
filteredHostnames = append(filteredHostnames, hostname)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uniqueHostnames = filteredHostnames
|
uniqueHostnames = filteredHostnames
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue