Module: Webhookdb::Postmark

Includes:
Appydays::Configurable
Defined in:
lib/webhookdb/postmark.rb

Class Method Summary collapse

Class Method Details

.webhook_response(request) ⇒ Object



15
16
17
18
19
# File 'lib/webhookdb/postmark.rb', line 15

def self.webhook_response(request)
  ip = request.ip
  allowed = self.allowed_ips.include?(ip)
  return allowed ? Webhookdb::WebhookResponse.ok : Webhookdb::WebhookResponse.error("invalid ip")
end