diff options
author | George Claghorn <george@basecamp.com> | 2018-10-18 10:23:17 -0400 |
---|---|---|
committer | George Claghorn <george@basecamp.com> | 2018-10-18 10:23:17 -0400 |
commit | b3919d01554d31c5486d17332f4a4dde89a23239 (patch) | |
tree | 42a4bcacda5f7e88824487b269e2893a96422333 /app/controllers/action_mailbox/ingresses/mailgun | |
parent | 88227658217ee82af7516d6a8013a6c04f037073 (diff) | |
download | rails-b3919d01554d31c5486d17332f4a4dde89a23239.tar.gz rails-b3919d01554d31c5486d17332f4a4dde89a23239.tar.bz2 rails-b3919d01554d31c5486d17332f4a4dde89a23239.zip |
Don't require Postfix to send form data
Diffstat (limited to 'app/controllers/action_mailbox/ingresses/mailgun')
-rw-r--r-- | app/controllers/action_mailbox/ingresses/mailgun/inbound_emails_controller.rb | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/app/controllers/action_mailbox/ingresses/mailgun/inbound_emails_controller.rb b/app/controllers/action_mailbox/ingresses/mailgun/inbound_emails_controller.rb index 4d194a3e00..77e05d712a 100644 --- a/app/controllers/action_mailbox/ingresses/mailgun/inbound_emails_controller.rb +++ b/app/controllers/action_mailbox/ingresses/mailgun/inbound_emails_controller.rb @@ -2,16 +2,11 @@ class ActionMailbox::Ingresses::Mailgun::InboundEmailsController < ActionMailbox before_action :ensure_authenticated def create - ActionMailbox::InboundEmail.create_and_extract_message_id! raw_email + ActionMailbox::InboundEmail.create_and_extract_message_id! params.require("body-mime") head :ok end private - def raw_email - StringIO.new params.require("body-mime") - end - - def ensure_authenticated head :unauthorized unless authenticated? end @@ -26,7 +21,6 @@ class ActionMailbox::Ingresses::Mailgun::InboundEmailsController < ActionMailbox params.permit(:timestamp, :token, :signature).to_h.symbolize_keys end - class Authenticator cattr_accessor :key |