diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2018-05-31 09:00:14 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2018-05-31 09:00:14 +0900 |
commit | e2e053608ed71d22d7f3e22af605ab284ef00f05 (patch) | |
tree | a90352fe7cede8a9cb1b932f831612633bb07d00 /actionpack/lib | |
parent | b74edd37c528f2070ebea27dacdc61d785ce49a8 (diff) | |
download | rails-e2e053608ed71d22d7f3e22af605ab284ef00f05.tar.gz rails-e2e053608ed71d22d7f3e22af605ab284ef00f05.tar.bz2 rails-e2e053608ed71d22d7f3e22af605ab284ef00f05.zip |
Avoid unused capture in `non_xhr_javascript_response?`
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/metal/request_forgery_protection.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/metal/request_forgery_protection.rb b/actionpack/lib/action_controller/metal/request_forgery_protection.rb index df15c45470..4bae795438 100644 --- a/actionpack/lib/action_controller/metal/request_forgery_protection.rb +++ b/actionpack/lib/action_controller/metal/request_forgery_protection.rb @@ -275,7 +275,7 @@ module ActionController #:nodoc: # Check for cross-origin JavaScript responses. def non_xhr_javascript_response? # :doc: - content_type =~ %r(\A(text|application)/javascript) && !request.xhr? + content_type =~ %r(\A(?:text|application)/javascript) && !request.xhr? end AUTHENTICITY_TOKEN_LENGTH = 32 |