Use `Rails.env.local?` shorthand method to check env (#27519)
parent
4aa05d45fc
commit
12550a6a28
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue