diff options
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rwxr-xr-x | actionpack/lib/action_dispatch/http/request.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/http/request.rb b/actionpack/lib/action_dispatch/http/request.rb index 1e366520c9..bb99fac5e0 100755 --- a/actionpack/lib/action_dispatch/http/request.rb +++ b/actionpack/lib/action_dispatch/http/request.rb @@ -97,6 +97,10 @@ module ActionDispatch end end + def forgery_whitelisted? + method == :get || xhr? || !(!content_type.nil? && content_type.verify_request?) + end + def media_type content_type.to_s end |