Server qr fixes.
This commit is contained in:
@@ -155,10 +155,10 @@ func (s *Server) startAutocertTLS(tlsConfig *config.TLSConfig, addr string) erro
|
||||
|
||||
// Create autocert manager
|
||||
certManager := &autocert.Manager{
|
||||
Prompt: autocert.AcceptTOS,
|
||||
HostPolicy: autocert.HostWhitelist(tlsConfig.Domain),
|
||||
Cache: autocert.DirCache(tlsConfig.CacheDir),
|
||||
Email: tlsConfig.Email,
|
||||
Prompt: autocert.AcceptTOS,
|
||||
HostPolicy: autocert.HostWhitelist(tlsConfig.Domain),
|
||||
Cache: autocert.DirCache(tlsConfig.CacheDir),
|
||||
Email: tlsConfig.Email,
|
||||
}
|
||||
|
||||
// Configure TLS
|
||||
@@ -215,6 +215,7 @@ func (s *Server) setupRoutes() *http.ServeMux {
|
||||
// Account management (with auth)
|
||||
mux.HandleFunc("/api/accounts", h.Auth(h.Accounts))
|
||||
mux.HandleFunc("/api/accounts/add", h.Auth(h.AddAccount))
|
||||
mux.HandleFunc("/api/accounts/remove", h.Auth(h.RemoveAccount))
|
||||
|
||||
// Send messages (with auth)
|
||||
mux.HandleFunc("/api/send", h.Auth(h.SendMessage))
|
||||
|
||||
Reference in New Issue
Block a user