aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/configuring.textile
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2012-03-10 06:42:58 -0800
committerSantiago Pastorino <santiago@wyeworks.com>2012-03-10 06:42:58 -0800
commitb0a93d650fd6299c3e83e2c7f9531923b88028da (patch)
treebd7ad3e5beaf5eaba87451d8ae71b4e3b51573fc /railties/guides/source/configuring.textile
parent3e776496d0a85942b65935e69ba63f1d1b5f18fc (diff)
parentec40f6cec082cfe76f24b27c19d15314f55be8af (diff)
downloadrails-b0a93d650fd6299c3e83e2c7f9531923b88028da.tar.gz
rails-b0a93d650fd6299c3e83e2c7f9531923b88028da.tar.bz2
rails-b0a93d650fd6299c3e83e2c7f9531923b88028da.zip
Merge pull request #5367 from carlosantoniodasilva/middleware-api
Change api_only to http_only and add MiddlewareStackProxy docs
Diffstat (limited to 'railties/guides/source/configuring.textile')
-rw-r--r--railties/guides/source/configuring.textile8
1 files changed, 8 insertions, 0 deletions
diff --git a/railties/guides/source/configuring.textile b/railties/guides/source/configuring.textile
index 0ab1076fff..619c0ae16c 100644
--- a/railties/guides/source/configuring.textile
+++ b/railties/guides/source/configuring.textile
@@ -248,6 +248,14 @@ They can also be removed from the stack completely:
config.middleware.delete ActionDispatch::BestStandardsSupport
</ruby>
+In addition to these methods to handle the stack, if your application is going to be used as an API endpoint only, the middleware stack can be configured like this:
+
+<ruby>
+config.middleware.http_only!
+</ruby>
+
+By doing this, Rails will create a smaller middleware stack, by not adding some middlewares that are usually useful for browser access only, such as Cookies, Session and Flash, BestStandardsSupport, and MethodOverride. You can always add any of them later manually if you want. Refer to the "API App docs":api_app.html for more info on how to setup your application for API only apps.
+
h4. Configuring i18n
* +config.i18n.default_locale+ sets the default locale of an application used for i18n. Defaults to +:en+.