diff options
author | Yuki Nishijima <mail@yukinishijima.net> | 2015-11-14 21:57:56 -0800 |
---|---|---|
committer | Yuki Nishijima <mail@yukinishijima.net> | 2015-11-16 03:39:24 -0800 |
commit | ce83dc98bb042b71c19bec600c2f3885efa33adf (patch) | |
tree | 05679bcf98b6d1c9c8deddcd448565547cb9cf73 /railties/lib/rails/application | |
parent | fdf5d4dfc30ce5a599392305567c0230c21b9b84 (diff) | |
download | rails-ce83dc98bb042b71c19bec600c2f3885efa33adf.tar.gz rails-ce83dc98bb042b71c19bec600c2f3885efa33adf.tar.bz2 rails-ce83dc98bb042b71c19bec600c2f3885efa33adf.zip |
Make the `static_index` config part of the `config.public_server` config
Also call it `public_server.index_name` so it'll make more sense.
Diffstat (limited to 'railties/lib/rails/application')
-rw-r--r-- | railties/lib/rails/application/configuration.rb | 4 | ||||
-rw-r--r-- | railties/lib/rails/application/default_middleware_stack.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index 6d89caf514..80733c2d90 100644 --- a/railties/lib/rails/application/configuration.rb +++ b/railties/lib/rails/application/configuration.rb @@ -14,7 +14,7 @@ module Rails :eager_load, :exceptions_app, :file_watcher, :filter_parameters, :force_ssl, :helpers_paths, :logger, :log_formatter, :log_tags, :railties_order, :relative_url_root, :secret_key_base, :secret_token, - :ssl_options, :static_index, :public_file_server, + :ssl_options, :public_file_server, :session_options, :time_zone, :reload_classes_only_on_change, :beginning_of_week, :filter_redirect, :x @@ -29,9 +29,9 @@ module Rails @filter_parameters = [] @filter_redirect = [] @helpers_paths = [] - @static_index = "index" @public_file_server = ActiveSupport::OrderedOptions.new @public_file_server.enabled = true + @public_file_server.index_name = "index" @force_ssl = false @ssl_options = {} @session_store = :cookie_store diff --git a/railties/lib/rails/application/default_middleware_stack.rb b/railties/lib/rails/application/default_middleware_stack.rb index b0d481c21a..5cb5bfb8b7 100644 --- a/railties/lib/rails/application/default_middleware_stack.rb +++ b/railties/lib/rails/application/default_middleware_stack.rb @@ -21,7 +21,7 @@ module Rails headers = config.public_file_server.headers || {} headers['Cache-Control'.freeze] = config.static_cache_control if config.static_cache_control - middleware.use ::ActionDispatch::Static, paths["public"].first, index: config.static_index, headers: headers + middleware.use ::ActionDispatch::Static, paths["public"].first, index: config.public_file_server.index_name, headers: headers end if rack_cache = load_rack_cache |