mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-06-14 16:43:37 +02:00
Return 507 for UP publishers without subscribers
This commit is contained in:
parent
d5052d79e6
commit
70cd267ff5
3 changed files with 7 additions and 7 deletions
server
|
@ -581,10 +581,9 @@ func (s *Server) handlePublishWithoutResponse(r *http.Request, v *visitor) (*mes
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
/*if unifiedpush && t.RateVisitor() == nil {
|
||||
return nil, errHTTPConflictCannotPublishWithoutRateVisitor
|
||||
} else*/
|
||||
if !util.ContainsIP(s.config.VisitorRequestExemptIPAddrs, v.ip) && !vrate.MessageAllowed() {
|
||||
if unifiedpush && t.RateVisitor() == nil {
|
||||
return nil, errHTTPInsufficientStorage
|
||||
} else if !util.ContainsIP(s.config.VisitorRequestExemptIPAddrs, v.ip) && !vrate.MessageAllowed() {
|
||||
return nil, errHTTPTooManyRequestsLimitMessages
|
||||
} else if email != "" && !vrate.EmailAllowed() {
|
||||
return nil, errHTTPTooManyRequestsLimitEmails
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue