diff --git a/rest_framework/static/rest_framework/js/csrf.js b/rest_framework/static/rest_framework/js/csrf.js index 6e4bf39a7..5f6b111e2 100644 --- a/rest_framework/static/rest_framework/js/csrf.js +++ b/rest_framework/static/rest_framework/js/csrf.js @@ -43,9 +43,8 @@ var csrftoken = window.drf.csrfToken; $.ajaxSetup({ beforeSend: function(xhr, settings) { if (!csrfSafeMethod(settings.type) && sameOrigin(settings.url)) { - // Send the token to same-origin, relative URLs only. - // Send the token only if the method warrants CSRF protection - // Using the CSRFToken value acquired earlier + /* Send the token to same-origin, relative URLs only. + Send the token only if the method warrants CSRF protection using the CSRFToken value acquired earlier*/ xhr.setRequestHeader(window.drf.csrfHeaderName, csrftoken); } }