instance method
non_xhr_javascript_response?
Ruby on Rails 5.2.8.1
Since v4.1.16 PrivateSignature
non_xhr_javascript_response?()
Check for cross-origin JavaScript responses.
Source
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 282
def non_xhr_javascript_response? # :doc:
content_type =~ %r(\Atext/javascript) && !request.xhr?
end
Defined in actionpack/lib/action_controller/metal/request_forgery_protection.rb line 282
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::RequestForgeryProtection