docbrown/config/initializers/middlewares.rb
rhymes 70e0e9b83a
[15 min fix] Fix some autoloading deprecation warnings (#13793)
* Fix autoloading for RateLimitChecker

* Fix autoloading for ForemStatsClient

* Fix autoloading for middlewares

* Move things to their proper place

* Move middleware usage to the proper place

* Re-add rest-client in datadog driver correctly

* Already required in config/initializers/middlewares.rb

* Bring that back

* Fix Honeybadger spec
2021-05-20 18:10:25 +02:00

5 lines
326 B
Ruby

Rails.configuration.middleware.use(Middlewares::SetCookieDomain) if Rails.env.production?
# Include middleware to ensure timezone for browser requests for Capybara specs
# matches the random zonebie timezone set at the beginning of our spec run
Rails.configuration.middleware.use(Middlewares::SetTimeZone) if Rails.env.test?