instance method
non_xhr_javascript_response?
Ruby on Rails 7.1.6
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 431
def non_xhr_javascript_response? # :doc:
%r(\A(?:text|application)/javascript).match?(media_type) && !request.xhr?
end
Defined in actionpack/lib/action_controller/metal/request_forgery_protection.rb line 431
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::RequestForgeryProtection