diff options
Diffstat (limited to 'actionpack/lib/action_dispatch/http/request.rb')
-rw-r--r-- | actionpack/lib/action_dispatch/http/request.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/http/request.rb b/actionpack/lib/action_dispatch/http/request.rb index d785635d1a..de28cd0998 100644 --- a/actionpack/lib/action_dispatch/http/request.rb +++ b/actionpack/lib/action_dispatch/http/request.rb @@ -35,7 +35,7 @@ module ActionDispatch HTTP_ACCEPT HTTP_ACCEPT_CHARSET HTTP_ACCEPT_ENCODING HTTP_ACCEPT_LANGUAGE HTTP_CACHE_CONTROL HTTP_FROM HTTP_NEGOTIATE HTTP_PRAGMA HTTP_CLIENT_IP - HTTP_X_FORWARDED_FOR + HTTP_X_FORWARDED_FOR HTTP_VERSION ].freeze ENV_METHODS.each do |env| @@ -134,6 +134,14 @@ module ActionDispatch end end + def controller_instance # :nodoc: + env['action_controller.instance'.freeze] + end + + def controller_instance=(controller) # :nodoc: + env['action_controller.instance'.freeze] = controller + end + def show_exceptions? # :nodoc: # We're treating `nil` as "unset", and we want the default setting to be # `true`. This logic should be extracted to `env_config` and calculated |