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:
parent
9aeea4d9fa
commit
dd02267f9b
3 changed files with 25 additions and 9 deletions
server
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue