diff --git a/config/application.rb b/config/application.rb index 463f1bc5..33615924 100644 --- a/config/application.rb +++ b/config/application.rb @@ -34,7 +34,7 @@ class Application < Rails::Application # Load the tracking server middleware require "postal/tracking_middleware" - config.middleware.use Postal::TrackingMiddleware + config.middleware.insert_before ActionDispatch::HostAuthorization, Postal::TrackingMiddleware config.logger = Postal.logger_for(:rails)