mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
56a86c2191
Provide a default in production.rb that can be modified, so that people who care about sendfile performance in production mode can get better performance easily.
17 lines
No EOL
606 B
Ruby
17 lines
No EOL
606 B
Ruby
require "action_dispatch"
|
|
require "rails"
|
|
|
|
module ActionDispatch
|
|
class Railtie < Rails::Railtie
|
|
config.action_dispatch = ActiveSupport::OrderedOptions.new
|
|
config.action_dispatch.x_sendfile_header = ""
|
|
config.action_dispatch.ip_spoofing_check = true
|
|
|
|
# Prepare dispatcher callbacks and run 'prepare' callbacks
|
|
initializer "action_dispatch.prepare_dispatcher" do |app|
|
|
# TODO: This used to say unless defined?(Dispatcher). Find out why and fix.
|
|
require 'rails/dispatcher'
|
|
ActionDispatch::Callbacks.to_prepare { app.routes_reloader.reload_if_changed }
|
|
end
|
|
end
|
|
end |