1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-06-22 12:28:02 +02:00

Disable PWA (manifest) when web push is disabled

This commit is contained in:
nimbleghost 2023-06-24 20:11:10 +02:00
parent 9aeea4d9fa
commit dd02267f9b
3 changed files with 25 additions and 9 deletions

View file

@ -60,7 +60,7 @@ func (s *Server) ensureWebEnabled(next handleFunc) handleFunc {
func (s *Server) ensureWebPushEnabled(next handleFunc) handleFunc {
return func(w http.ResponseWriter, r *http.Request, v *visitor) error {
if s.config.WebPushPublicKey == "" {
if s.config.WebRoot == "" || s.config.WebPushPublicKey == "" {
return errHTTPNotFound
}
return next(w, r, v)