Update application.rb

This commit is contained in:
Shlee 2026-07-23 16:10:20 +09:30 committed by GitHub
parent 5f5dfd7823
commit ab146fc7bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -86,6 +86,7 @@ module Mastodon
# We use our own middleware for this
config.public_file_server.enabled = false
config.middleware.use Rack::Deflater if ENV['RACK_COMPRESS'] == 'true'
config.middleware.use Mastodon::Middleware::PublicFileServer if Rails.env.local? || ENV['RAILS_SERVE_STATIC_FILES'] == 'true'
config.middleware.use Rack::Attack
config.middleware.use Mastodon::Middleware::SocketCleanup