mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Remove remaining http_only? calls.
This commit is contained in:
parent
6db930cb5b
commit
e1824c5991
2 changed files with 4 additions and 14 deletions
|
@ -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
|
||||
|
|
|
@ -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 = []
|
||||
|
|
Loading…
Reference in a new issue