aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2012-03-14 22:58:32 +0100
committerJosé Valim <jose.valim@gmail.com>2012-03-14 22:58:32 +0100
commite1824c5991f0e694cf041c3aacd43a53ce97b0dd (patch)
tree2c780976c006e770d66503bba42b90203e270478 /railties/lib
parent6db930cb5bbff9ad824590b5844e04768de240b1 (diff)
downloadrails-e1824c5991f0e694cf041c3aacd43a53ce97b0dd.tar.gz
rails-e1824c5991f0e694cf041c3aacd43a53ce97b0dd.tar.bz2
rails-e1824c5991f0e694cf041c3aacd43a53ce97b0dd.zip
Remove remaining http_only? calls.
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails/application.rb8
-rw-r--r--railties/lib/rails/configuration.rb10
2 files changed, 4 insertions, 14 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb
index 3191fe68a7..8d64aff430 100644
--- a/railties/lib/rails/application.rb
+++ b/railties/lib/rails/application.rb
@@ -239,7 +239,7 @@ module Rails
middleware.use ::Rack::Lock unless config.allow_concurrency
middleware.use ::Rack::Runtime
- middleware.use ::Rack::MethodOverride unless config.middleware.http_only?
+ middleware.use ::Rack::MethodOverride
middleware.use ::ActionDispatch::RequestId
middleware.use ::Rails::Rack::Logger, config.log_tags # must come after Rack::MethodOverride to properly log overridden methods
middleware.use ::ActionDispatch::ShowExceptions, config.exceptions_app || ActionDispatch::PublicExceptions.new(Rails.public_path)
@@ -252,9 +252,9 @@ module Rails
end
middleware.use ::ActionDispatch::Callbacks
- middleware.use ::ActionDispatch::Cookies unless config.middleware.http_only?
+ middleware.use ::ActionDispatch::Cookies
- if !config.middleware.http_only? && config.session_store
+ if config.session_store
if config.force_ssl && !config.session_options.key?(:secure)
config.session_options[:secure] = true
end
@@ -267,7 +267,7 @@ module Rails
middleware.use ::Rack::ConditionalGet
middleware.use ::Rack::ETag, "no-cache"
- if !config.middleware.http_only? && config.action_dispatch.best_standards_support
+ if config.action_dispatch.best_standards_support
middleware.use ::ActionDispatch::BestStandardsSupport, config.action_dispatch.best_standards_support
end
end
diff --git a/railties/lib/rails/configuration.rb b/railties/lib/rails/configuration.rb
index d81206bdc6..d8ca6cbd21 100644
--- a/railties/lib/rails/configuration.rb
+++ b/railties/lib/rails/configuration.rb
@@ -33,16 +33,6 @@ module Rails
#
# config.middleware.delete ActionDispatch::BestStandardsSupport
#
- # 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:
- #
- # config.middleware.http_only!
- #
- # 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.
class MiddlewareStackProxy
def initialize
@operations = []