aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
authorEliot Sykes <eliotsykes@gmail.com>2015-05-04 20:55:23 +0100
committerEliot Sykes <eliotsykes@gmail.com>2015-05-28 09:41:00 +0100
commit3ff39494cdea67502dbd6465358eca3e14a84d6b (patch)
tree89e83c974e2e515de9aa12fcc09176255fa905ee /guides/source
parent7cc9754209c0ae00d70bdd629fa4a81a1c74cc6f (diff)
downloadrails-3ff39494cdea67502dbd6465358eca3e14a84d6b.tar.gz
rails-3ff39494cdea67502dbd6465358eca3e14a84d6b.tar.bz2
rails-3ff39494cdea67502dbd6465358eca3e14a84d6b.zip
config.static_index configures directory index "index.html" filename
Set `config.static_index` to serve a static directory index file not named `index`. For example, to serve `main.html` instead of `index.html` for directory requests, set `config.static_index` to `"main"`.
Diffstat (limited to 'guides/source')
-rw-r--r--guides/source/configuring.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/source/configuring.md b/guides/source/configuring.md
index 31b937c925..0e669ed597 100644
--- a/guides/source/configuring.md
+++ b/guides/source/configuring.md
@@ -202,7 +202,7 @@ The full set of methods that can be used in this block are as follows:
Every Rails application comes with a standard set of middleware which it uses in this order in the development environment:
* `ActionDispatch::SSL` forces every request to be under HTTPS protocol. Will be available if `config.force_ssl` is set to `true`. Options passed to this can be configured by using `config.ssl_options`.
-* `ActionDispatch::Static` is used to serve static assets. Disabled if `config.serve_static_files` is `false`.
+* `ActionDispatch::Static` is used to serve static assets. Disabled if `config.serve_static_files` is `false`. Set `config.static_index` if you need to serve a static directory index file that is not named `index`. For example, to serve `main.html` instead of `index.html` for directory requests, set `config.static_index` to `"main"`.
* `Rack::Lock` wraps the app in mutex so it can only be called by a single thread at a time. Only enabled when `config.cache_classes` is `false`.
* `ActiveSupport::Cache::Strategy::LocalCache` serves as a basic memory backed cache. This cache is not thread safe and is intended only for serving as a temporary memory cache for a single thread.
* `Rack::Runtime` sets an `X-Runtime` header, containing the time (in seconds) taken to execute the request.