1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionpack/lib
Derek Prior 13fd5586ce
Add redirect_back for safer referrer redirects
`redirect_to :back` is a somewhat common pattern in Rails apps, but it
is not completely safe. There are a number of circumstances where HTTP
referrer information is not available on the request. This happens often
with bot traffic and occasionally to user traffic depending on browser
security settings.

When there is no referrer available on the request, `redirect_to :back`
will raise `ActionController::RedirectBackError`, usually resulting in
an application error.

`redirect_back` takes a required `fallback_location` keyword argument
that specifies the redirect when the referrer information is not
available.  This prevents 500 errors caused by
`ActionController::RedirectBackError`.
2015-12-16 11:42:05 -05:00
..
abstract_controller Deprecate passing string to define callback. 2015-12-16 19:56:20 +09:00
action_controller Add redirect_back for safer referrer redirects 2015-12-16 11:42:05 -05:00
action_dispatch Merge pull request #22564 from maximeg/legit_name_errors 2015-12-14 10:17:42 -07:00
action_pack
abstract_controller.rb Remove not used requires 2015-09-01 20:36:47 +02:00
action_controller.rb remove RackDelegation module 2015-08-26 11:53:15 -07:00
action_dispatch.rb Soften the lock requirements when eager_load is disabled 2015-07-09 02:23:23 +09:30
action_pack.rb