Add build flag for webpush

This commit is contained in:
binwiederhier
2025-08-07 18:31:42 +02:00
parent d9ab7cc78d
commit 00409d834b
4 changed files with 14 additions and 0 deletions

View File

@@ -15,6 +15,10 @@ import (
)
const (
// WebPushAvailable is a constant used to indicate that WebPush support is available.
// It can be disabled with the 'nowebpush' build tag.
WebPushAvailable = true
webPushTopicSubscribeLimit = 50
)

View File

@@ -6,6 +6,12 @@ import (
"net/http"
)
const (
// WebPushAvailable is a constant used to indicate that WebPush support is available.
// It can be disabled with the 'nowebpush' build tag.
WebPushAvailable = false
)
func (s *Server) handleWebPushUpdate(w http.ResponseWriter, r *http.Request, v *visitor) error {
return errHTTPNotFound
}

View File

@@ -1,3 +1,5 @@
//go:build !nowebpush
package server
import (