mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
3979403781
Per this comment https://github.com/rails/rails/pull/18334#issuecomment-69234050 we want `protect_from_forgery` to default to `prepend: false`. `protect_from_forgery` will now be insterted into the callback chain at the point it is called in your application. This is useful for cases where you want to `protect_from_forgery` after you perform required authentication callbacks or other callbacks that are required to run after forgery protection. If you want `protect_from_forgery` callbacks to always run first, regardless of position they are called in your application, then you can add `prepend: true` to your `protect_from_forgery` call. Example: ```ruby protect_from_forgery prepend: true ``` |
||
---|---|---|
.. | ||
caching | ||
metal | ||
railties | ||
api.rb | ||
base.rb | ||
caching.rb | ||
form_builder.rb | ||
log_subscriber.rb | ||
metal.rb | ||
railtie.rb | ||
renderer.rb | ||
template_assertions.rb | ||
test_case.rb |