1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Avoid unused capture in non_xhr_javascript_response?

This commit is contained in:
Ryuta Kamizono 2018-05-31 09:00:14 +09:00
parent b74edd37c5
commit e2e053608e

View file

@ -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