|
@@ -9,8 +9,6 @@ import (
|
|
|
"encoding/json"
|
|
"encoding/json"
|
|
|
"errors"
|
|
"errors"
|
|
|
"fmt"
|
|
"fmt"
|
|
|
- "gopkg.in/yaml.v2"
|
|
|
|
|
- "heckel.io/ntfy/v2/payments"
|
|
|
|
|
"io"
|
|
"io"
|
|
|
"net"
|
|
"net"
|
|
|
"net/http"
|
|
"net/http"
|
|
@@ -33,7 +31,9 @@ import (
|
|
|
"github.com/gorilla/websocket"
|
|
"github.com/gorilla/websocket"
|
|
|
"github.com/prometheus/client_golang/prometheus/promhttp"
|
|
"github.com/prometheus/client_golang/prometheus/promhttp"
|
|
|
"golang.org/x/sync/errgroup"
|
|
"golang.org/x/sync/errgroup"
|
|
|
|
|
+ "gopkg.in/yaml.v2"
|
|
|
"heckel.io/ntfy/v2/log"
|
|
"heckel.io/ntfy/v2/log"
|
|
|
|
|
+ "heckel.io/ntfy/v2/payments"
|
|
|
"heckel.io/ntfy/v2/user"
|
|
"heckel.io/ntfy/v2/user"
|
|
|
"heckel.io/ntfy/v2/util"
|
|
"heckel.io/ntfy/v2/util"
|
|
|
"heckel.io/ntfy/v2/util/sprig"
|
|
"heckel.io/ntfy/v2/util/sprig"
|
|
@@ -600,12 +600,12 @@ func (s *Server) handleWebConfig(w http.ResponseWriter, _ *http.Request, _ *visi
|
|
|
BaseURL: "", // Will translate to window.location.origin
|
|
BaseURL: "", // Will translate to window.location.origin
|
|
|
AppRoot: s.config.WebRoot,
|
|
AppRoot: s.config.WebRoot,
|
|
|
EnableLogin: s.config.EnableLogin,
|
|
EnableLogin: s.config.EnableLogin,
|
|
|
|
|
+ RequireLogin: s.config.RequireLogin,
|
|
|
EnableSignup: s.config.EnableSignup,
|
|
EnableSignup: s.config.EnableSignup,
|
|
|
EnablePayments: s.config.StripeSecretKey != "",
|
|
EnablePayments: s.config.StripeSecretKey != "",
|
|
|
EnableCalls: s.config.TwilioAccount != "",
|
|
EnableCalls: s.config.TwilioAccount != "",
|
|
|
EnableEmails: s.config.SMTPSenderFrom != "",
|
|
EnableEmails: s.config.SMTPSenderFrom != "",
|
|
|
EnableReservations: s.config.EnableReservations,
|
|
EnableReservations: s.config.EnableReservations,
|
|
|
- ReuqireLogin: s.config.RequireLogin,
|
|
|
|
|
EnableWebPush: s.config.WebPushPublicKey != "",
|
|
EnableWebPush: s.config.WebPushPublicKey != "",
|
|
|
BillingContact: s.config.BillingContact,
|
|
BillingContact: s.config.BillingContact,
|
|
|
WebPushPublicKey: s.config.WebPushPublicKey,
|
|
WebPushPublicKey: s.config.WebPushPublicKey,
|