High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.
JavaScript campaigncampaign-managementemail-marketingemail-subscriptionlistmonkmailing-listnewsletternewsletter-managementnewsletter-softwareself-hostedsms-gatewaysmtptransactional-emails
Make public subscription API follow the 'enable public' setting.
Kailash Nadha6a2b6982036
diff --git a/cmd/public.go b/cmd/public.goindex 7816ca31..ff8e6dc5 100644--- a/cmd/public.go+++ b/cmd/public.go@@ -482,6 +482,14 @@ func handleSubscriptionForm(c echo.Context) error {// handlePublicSubscription handles subscription requests coming from public// API calls.func handlePublicSubscription(c echo.Context) error {+ var (+ app = c.Get("app").(*App)+ )++ if !app.constants.EnablePublicSubPage {+ return echo.NewHTTPError(http.StatusBadRequest, app.i18n.T("public.invalidFeature"))+ }+hasOptin, err := processSubForm(c)if err != nil {return err