BillionMail gives you open-source MailServer, NewsLetter, Email Marketing — fully self-hosted, dev-friendly, and free from monthly fees. Join the discord: https://discord.gg/asfXzBUhZr
Fixing cmd.go
lotkdf85f6bcac93
diff --git a/core/internal/cmd/cmd.go b/core/internal/cmd/cmd.goindex 9bb8476a..a31c0d8d 100644--- a/core/internal/cmd/cmd.go+++ b/core/internal/cmd/cmd.go@@ -32,6 +32,7 @@ import ("github.com/gogf/gf/v2/frame/g""github.com/gogf/gf/v2/net/ghttp""github.com/gogf/gf/v2/os/gcmd"+ "github.com/gogf/gf/v2/util/gconv""net/http""net/http/httputil""net/url"@@ -339,19 +340,19 @@ var (// Enable HTTPSs.EnableHTTPS(public.AbsPath(filepath.Join(consts.SSL_PATH, "cert.pem")), public.AbsPath(filepath.Join(consts.SSL_PATH, "key.pem")))- //// attempt add http port- //if httpPort, err := public.DockerEnv("HTTP_PORT"); err == nil && httpPort != "" {- // s.SetPort(gconv.Int(httpPort))- //}- //- //// Set HTTPS ports- //s.SetHTTPSPort(g.Cfg().MustGet(ctx, "server.httpsPort", 443).Int())- //if httpsPort, err := public.DockerEnv("HTTPS_PORT"); err == nil && httpsPort != "" {- // s.SetHTTPSPort(gconv.Int(httpsPort))- //}-- s.SetHTTPSPort(82)- s.SetPort(81)+ // attempt add http port+ if httpPort, err := public.DockerEnv("HTTP_PORT"); err == nil && httpPort != "" {+ s.SetPort(gconv.Int(httpPort))+ }++ // Set HTTPS ports+ s.SetHTTPSPort(g.Cfg().MustGet(ctx, "server.httpsPort", 443).Int())+ if httpsPort, err := public.DockerEnv("HTTPS_PORT"); err == nil && httpsPort != "" {+ s.SetHTTPSPort(gconv.Int(httpsPort))+ }++ //s.SetHTTPSPort(82)+ //s.SetPort(81)s.SetSwaggerUITemplate(`<!doctype html><html lang="en">