This commit is contained in:
2023-08-24 10:34:38 +08:00
parent d7d0b3c2c0
commit a66f3d4129

View File

@@ -158,7 +158,7 @@ func main() {
if rest.IPv4 != "" {
listen := rest.IPv4 + ":" + strconv.Itoa(int(rest.Port))
if strings.ToLower(rest.Schema) == "https" {
go HttpListenConfigTLS(listen, rest.CaFile, rest.CertFile, rest.KeyFile, router)
go HttpListenTLS(listen, rest.CertFile, rest.KeyFile, router)
} else {
go HttpListen(listen, router)
}
@@ -168,7 +168,7 @@ func main() {
if rest.IPv6 != "" {
listenv6 := "[" + rest.IPv6 + "]" + ":" + strconv.Itoa(int(rest.Port))
if strings.ToLower(rest.Schema) == "https" {
go HttpListenConfigTLS(listenv6, rest.CaFile, rest.CertFile, rest.KeyFile, router)
go HttpListenTLS(listenv6, rest.CertFile, rest.KeyFile, router)
} else {
go HttpListen(listenv6, router)
}