aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailbox/config/routes.rb
diff options
context:
space:
mode:
authorGeorge Claghorn <george.claghorn@gmail.com>2018-12-26 11:02:59 -0500
committerGitHub <noreply@github.com>2018-12-26 11:02:59 -0500
commit9b35b9ff417e8ec9888deac1e66c2855677164cd (patch)
tree82dc9a20a23b855f91f743c5029ec7a97a35b824 /actionmailbox/config/routes.rb
parentb5ed468492387d42a44ca6af525d4a274cda756d (diff)
parenta5b2fff64ca0c1fa7be5124f40a251d991c10a85 (diff)
downloadrails-9b35b9ff417e8ec9888deac1e66c2855677164cd.tar.gz
rails-9b35b9ff417e8ec9888deac1e66c2855677164cd.tar.bz2
rails-9b35b9ff417e8ec9888deac1e66c2855677164cd.zip
Merge pull request #34786 from georgeclaghorn/actionmailbox
Import Action Mailbox
Diffstat (limited to 'actionmailbox/config/routes.rb')
-rw-r--r--actionmailbox/config/routes.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/actionmailbox/config/routes.rb b/actionmailbox/config/routes.rb
new file mode 100644
index 0000000000..f1bc9847f5
--- /dev/null
+++ b/actionmailbox/config/routes.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+Rails.application.routes.draw do
+ scope "/rails/action_mailbox", module: "action_mailbox/ingresses" do
+ post "/amazon/inbound_emails" => "amazon/inbound_emails#create", as: :rails_amazon_inbound_emails
+ post "/mandrill/inbound_emails" => "mandrill/inbound_emails#create", as: :rails_mandrill_inbound_emails
+ post "/postfix/inbound_emails" => "postfix/inbound_emails#create", as: :rails_postfix_inbound_emails
+ post "/sendgrid/inbound_emails" => "sendgrid/inbound_emails#create", as: :rails_sendgrid_inbound_emails
+
+ # Mailgun requires that a webhook's URL end in 'mime' for it to receive the raw contents of emails.
+ post "/mailgun/inbound_emails/mime" => "mailgun/inbound_emails#create", as: :rails_mailgun_inbound_emails
+ end
+
+ # TODO: Should these be mounted within the engine only?
+ scope "rails/conductor/action_mailbox/", module: "rails/conductor/action_mailbox" do
+ resources :inbound_emails, as: :rails_conductor_inbound_emails
+ post ":inbound_email_id/reroute" => "reroutes#create", as: :rails_conductor_inbound_email_reroute
+ end
+end