Skip to content

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

Adjust the page related to the subscription list

lotkb9c715e466f2
diff --git a/core/internal/cmd/cmd.go b/core/internal/cmd/cmd.go
index 9e12f9e3..2cf86278 100644
--- a/core/internal/cmd/cmd.go
+++ b/core/internal/cmd/cmd.go
@@ -33,6 +33,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"
@@ -354,19 +355,19 @@ var (
// Enable HTTPS
s.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">
diff --git a/core/internal/service/subscribe_list/subscribe_url.go b/core/internal/service/subscribe_list/subscribe_url.go
index c9afaa0b..f420ad2b 100644
--- a/core/internal/service/subscribe_list/subscribe_url.go
+++ b/core/internal/service/subscribe_list/subscribe_url.go
@@ -10,13 +10,11 @@ import (
)
func ReplaceSubmitUrl(ctx context.Context) {
- g.Log().Errorf(ctx, "@@@@@@@@@@更新 {{ SubmitURL . }}")
hostwork := public.HostWorkDir
filePath := filepath.Join(hostwork, "/core/public/html/subscribe_form.html")
content := gfile.GetContents(filePath)
if !strings.Contains(content, "{{ SubmitURL . }}") {
- g.Log().Errorf(ctx, "@@@@@@@@@@ 跳过 {{ SubmitURL . }}")
return
}