diff --git a/app/models/user.rb b/app/models/user.rb index fa445af811..2ebf4a24bf 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -488,7 +488,7 @@ class User < ApplicationRecord end def validate_email_dns? - email_changed? && !external? && !(Rails.env.test? || Rails.env.development?) + email_changed? && !external? && !Rails.env.local? # rubocop:disable Rails/UnknownEnv end def validate_role_elevation diff --git a/config/application.rb b/config/application.rb index 7f7f8b5d6c..ad931fd36b 100644 --- a/config/application.rb +++ b/config/application.rb @@ -206,7 +206,7 @@ module Mastodon # We use our own middleware for this config.public_file_server.enabled = false - config.middleware.use PublicFileServerMiddleware if Rails.env.development? || Rails.env.test? || ENV['RAILS_SERVE_STATIC_FILES'] == 'true' + config.middleware.use PublicFileServerMiddleware if Rails.env.local? || ENV['RAILS_SERVE_STATIC_FILES'] == 'true' # rubocop:disable Rails/UnknownEnv config.middleware.use Rack::Attack config.middleware.use Mastodon::RackMiddleware