提交 3d907a68 编写于 作者: M Michael Koziarski

Prepend the CSRF filter to make it much more difficult to execute application code before it fires.

上级 2cce44fa
......@@ -66,7 +66,7 @@ module ClassMethods
# * <tt>:only/:except</tt> - Passed to the <tt>before_filter</tt> call. Set which actions are verified.
def protect_from_forgery(options = {})
self.request_forgery_protection_token ||= :authenticity_token
before_filter :verify_authenticity_token, options
prepend_before_filter :verify_authenticity_token, options
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册